I wish to take screenshots of fullscreen applications in a c++ program (i.e games like call of duty). I have tried using GDI and directx both can get screenshots of the desktop. However they just return black images when running fullscreen applications. Has anybody else manage to solve this problem and if so how?
Asked
Active
Viewed 1,725 times
2
-
1possible duplicate of [Take screenshot of DirectX full-screen application](http://stackoverflow.com/questions/1962142/take-screenshot-of-directx-full-screen-application) – nvoigt Oct 21 '13 at 15:43
-
Have you tried to use the WinApi? Here's an example: [link][1] [1]: http://stackoverflow.com/questions/3291167/how-to-make-screen-screenshot-with-win32-in-c – MichaelXanadu Oct 21 '13 at 15:45
-
Here is a good link, assuming you are using windows: [link][1] [1]: http://stackoverflow.com/questions/7292757/how-to-get-screenshot-of-a-window-as-bitmap-object-in-c – code_fodder Oct 21 '13 at 15:55
-
Have tried the WinAPI still no luck – Steven Oct 21 '13 at 16:07
-
Assuming a *nix system, something along the lines of `cat /dev/fb0 > file` should catch the raw screen data into a file. You'll probably have to convert it into something other than raw screen information, but I am sure there are tools you can pipe the data through to do that. – mfabel Oct 21 '13 at 17:24