I've been searching for the past two days on how to enumerate only the visible windows on the desktop (ala Taskbar/Alt+Tab list) I am using EnumWindows to get the list of the windows and this is what I am currently using to filter:
But i still see windows that are not on the taskbar. i.e. "GDI+ Window"
How can I filter to only windows that show up on the taskbar or in the alt+tab list?
Code:
if( (IsWindowVisible(hwnd) || IsIconic(hwnd)) && (GetWindowLong(hwnd, GWL_HWNDPARENT) == 0) && ( (((GetWindowLong(hwnd, GWL_EXSTYLE) & WS_EX_TOOLWINDOW) == 0) && GetWindow(hwnd, GW_OWNER) == 0) || ((GetWindowLong(hwnd, GWL_EXSTYLE) & WS_EX_APPWINDOW) && GetWindow(hwnd, GW_OWNER) != 0) ))
How can I filter to only windows that show up on the taskbar or in the alt+tab list?
Comment