C ++ Multi Monitor - Find all visible / open windows

I am trying to find all windows of any kind that are open (and have a 'button' taskbar).

I have no problem finding the processes of the / hWnd list, and then looping through, but how do I determine if the / hwnd process window opens? (even if minimized).

I tried to make different combinations of window parameters (for example, WS_POPUP, etc.), but none of the parameters (or parameter combinations) that I could find would provide me with all open windows without any false positives. An example of a false positive was the fact that it gives me two “windows” for google talk (although one was open). Another false positive considers the start menu as an open window.

Any ideas? Solutions? I worked on this for a while, and it confused me a bit.

Note. I am doing this for Windows 7 (for now). I'm not sure if there is a difference between how you will do this between XP and 7, but I thought that might be relevant.

+3
source share
1 answer

Can you use EnumWindows ()? It finds only top-level windows.

EnumWindows (MSDN)

+2
source

Source: https://habr.com/ru/post/1746058/


All Articles