Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Desktop Window Manager capture the whole screen

I was wondering if anyone could give me a starting point of how to capture the entire screen in Windows Vista/7? I know how to do it in previous versions of Windows, but would really like to keep everything in the D3D stack, without resorting to GDI/BltBit calls.

I realize that you can get a live thumbnail of a given window if you have the HWND using the DWM API, but how do you get a "thumbnail" of the entire desktop?

Thanks,

Alex

like image 773
Alex Avatar asked Dec 12 '25 13:12

Alex


1 Answers

Unfortunately, the functions to do this are in the dwmapi.dll, and are undocumented. Someone figured out how to do it to get the directx surface of another window in vista, and use this to capture the screen, but those functions don't work on Windows 7.

The best thing you can do is get the thumbnails of individual windows, at least, that's all I've found.

like image 196
FryGuy Avatar answered Dec 15 '25 16:12

FryGuy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!