xeross
September 3rd, 2009, 03:27 PM
Hey People,
I've been working on an application that needs to create a list of all open windows.
So far I've got EnumWindows working with a callback, but I can't seem to filter all windows out that don't show up during alt-tabbing.
How would I filter those windows out ? Below are the checks I already enforced in my callback function.
if(hWnd == NULL)
return true;
int titleLength = GetWindowTextLength(hWnd);
if(0 == titleLength)
return true;
if( ( false == IsWindowVisible(hWnd) || false == IsIconic(hWnd) ) && false == IsWindow(hWnd))
return true;
if(GetParent(hWnd) != 0)
return true;
// Add it to the list here
So what would I need to add to filter it to windows only seeable on alt-tab ?
Thank you for your time, Xeross
I've been working on an application that needs to create a list of all open windows.
So far I've got EnumWindows working with a callback, but I can't seem to filter all windows out that don't show up during alt-tabbing.
How would I filter those windows out ? Below are the checks I already enforced in my callback function.
if(hWnd == NULL)
return true;
int titleLength = GetWindowTextLength(hWnd);
if(0 == titleLength)
return true;
if( ( false == IsWindowVisible(hWnd) || false == IsIconic(hWnd) ) && false == IsWindow(hWnd))
return true;
if(GetParent(hWnd) != 0)
return true;
// Add it to the list here
So what would I need to add to filter it to windows only seeable on alt-tab ?
Thank you for your time, Xeross