In VC++, I use EnumWindows(…), GetWindow(…), and GetWindowLong(), to get the list of windows and check whether the window is top window (no other window as owner), and whether the window is visible (WS_VISIBLE). However, although my desktop is showing only 5 windows, this EnumWindows is giving me 50 windows, how funny! Any Windows geek here please help me clarify…
In VC++, I use EnumWindows(…), GetWindow(…), and GetWindowLong(), to get the list of windows
Share
The way to list out only windows in taskbar (or similarly in Alt-Tab box) is described by Raymond in this article on MSDN blog:
Which windows appear in the Alt+Tab list?
And this is the super function to check whether a window is shown in alt-tab:
Credited to the source code here:
http://www.dfcd.net/projects/switcher/switcher.c