On Tue, 2008-03-11 at 16:13 -0700, Tim Roberts wrote: > 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 ) >
Ok, havent tried it yet but im sure it will work. But why isnt there any documentation what the arguments are good for? Julius _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32