6

I am using virtual desktops on Windows using simple app that i coded myself in C++, i was wondering if there is way to capture screenshot of secondary/hidden desktop ? I know that i can do SwitchDesktop -> capture screenshot -> SwitchDesktop, but it doesnt sound like good solution....

Maybe i run some window in the hidden desktop, to get its hwnd and SOMEHOW to use it to capture the entire screen ?

I have run Spy++ but seems it not finding windows that dont belong to currently active desktop.

Thanks in advance.

VisaToHell
  • 508
  • 1
  • 12
  • 29
  • `PrintWindow` might be useful. – chris Apr 29 '12 at 20:05
  • Probably i have to pass HWND to the desktop window but how do i get HWND ? Also will it work executed from other desktop or PrintWindow must be executed from the same desktop i want to capture... its kinda confusing me... – VisaToHell Apr 29 '12 at 20:17
  • 1
    I'm not aware of communication methods between multiple desktops. I'd use that to make a nice multiple desktops app if I did :/ – chris Apr 29 '12 at 20:24
  • 1
    http://stackoverflow.com/questions/4580520/take-a-screenshot-of-a-desktop-created-using-createdesktop-api – Flot2011 Apr 29 '12 at 20:52
  • Flot2011, this method is helping me to capture just Window from the other desktop but not the entire desktop.... So still looking for help..... – VisaToHell Apr 30 '12 at 17:25

1 Answers1

2

If you could live without XP support this article explains how to use DWM API for getting screenshot of the invisible desktop.

Flot2011
  • 4,601
  • 3
  • 44
  • 61