I'm working on an app that creates a desktop wallpaper diashow (for multi-monitor-setups). I want to skip displays which are not visible, when some other app runs in fullscreen for example.
EDIT
I set wallpapers using the IDesktopWallpaper
interface, which needs a DeviceId.
I managed to get the DeviceNames (like \.\DISPLAY1) and the DeviceIds (like \?\DISPLAY#GSM76FE#5&3b13964d&0&UID4354#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}) using EnumDisplayDevices
.
Now I'm trying to get their corresponding desktops, to get all windows on that desktop, to check if they cover that desktop.
I tried EnumDesktops
, like stated here, but it only returns the names "s" and "D" for me, and I can't OpenDesktop
them (it returns a null handle, GetLastError
returns 2).