I am using Windows 11 and with WinKey+TAB I create several desktops. They have the very nifty feature that ALT+TAB only shows the windows present on a given desktop, thus hugely reducing visual clutter. It is also able to show selected windows on all desktops. I think that these virtual desktops were available before Windows 11 as well.
However, when I enumerate desktops with a Win32 console application doing a simple combination of GetProcessWindowStation() followed by a call to EnumDesktops() I get back always the same answer, regardless of how many desktops I have created. I get two desktops named: DummyDesktopForInstantResume and Default
So it seems that the WinKey+Tab 'desktops' are not the same as the EnumDesktops() 'desktops'.
I did some additional digging with Spy++ and it shows only one root desktop with all the windows belonging to that desktop. No matter on which desktop Spy++ "appears" in it always shows the same window list. And no matter on which desktops an application appears, it always has the same window handle (as expected).
Anyone knows how do we enumerate the virtual desktops created by WinKey+TAB in Windows 11? Thanks