B wrote:
>
> # pass in window handle and parent node
> def gwl(node, hwnd):
> if hwnd:
> yield node, hwnd
> for nd, wnd in Wnd.gwl(node.children[-1], GetWindow(hwnd,
> GW_CHILD)):
> yield nd, wnd
> for nd, wnd in Wnd.gwl(node, GetWind
B wrote:
Now it works, but it runs quite slow (compared to the c++ app). I
changed gwl from strait recursion to use a generator and that helped,
but it still takes 0.5-1.0 seconds to populate the tree. What I'm
wondering is am I doing it in a really inefficient way, or is it just
python?
W
Hey I found some (VERY) old C++ code of mine that recursively built a
tree of the desktop window handles (on windows) using: (they are stored
in an STL vector)
void FWL(HWND hwnd, int nFlag) // Recursive Function
{
hwnd = GetWindow(hwnd, nFlag);
if(hwnd == NULL)