Julius wrote:
> My fault(already got that one running), i meant the 
> win32gui.EnumChildWindows(currentHwnd, windowEnumerationHandler,
> childWindows)
> function.
>
> from what i understand the purpose of this function is to return the
> childwindows from a top window - if this is right why not just pass a
> topwindow as argument and return a list of childwindows?
>   

Windows APIs don't ever return lists of things, because it present a 
memory management difficulty.  Who allocates, who owns, who releases, 
etc.  Instead, they all use the "enumeration callback" concept.  That 
way, if you want a list, you can construct and maintain it yourself.

If you just want the list of handles, you can do something like this:
    childlist = []
    win32ui.EnumChildWindows( hwnd, lamba hwnd,oldlist: oldlist.append( 
hwnd ), childlist )

-- 
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.

_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to