static void xppGetAllWindowsOpen(Args _args)
{        
        hWnd Parent;
        hWnd handle;
        hWnd mdi;
        #WinApi
        dialog d = new Dialog();
        DialogTabPage dt;
        str text;
        ;
        d.caption("All the windows");
        d.windowType(FormWindowType::PopUp);
        Parent = infolog.hWnd();
        mdi = WinApi::getWindow(Parent, #GW_CHILD);
        handle = WinApi::getWindow(mdi, #GW_CHILD);
        text = WinApi::getWindowText(handle);
        if(text)        
       {                
                dt = d.addTabPage(text);
                d.addText(text);
        } 
        if(handle)        
       {                
                  while(handle)                
                  {                        
                        handle = WinApi::getWindow(handle, #GW_HWNDNEXT);
                        text = WinApi::getWindowText(handle);
                        if(text)                        
                       {                                
                                dt = d.addTabPage(text);
                                d.addText(text);
                        }                
               }
        } 
        d.run();
}
 
 
Nice,just what i was looking for!
ReplyDelete