print screen to .bmp

Hi does anyone know a WORKING example of code that makes screenshot and saves it to a .bmp file?

Thanks!
Last edited on
You don't provide enough info for anyone to help you. C++ has no concept of your video display so it's entirely system dependent and will require some external libraries.

You can start here though: https://msdn.microsoft.com/en-us/library/dd183402(v=vs.85).aspx

BTW, in windows Alt-PrntScrn will store an image of the active window to you clipboard. Cnlt-Alt-PrntScrn will copy the whole display area.
sorry I wasn't clear enough. I want to simulate pressing prtscr and to copy it to a .bmp file.

I am using Windows professional on computer Acer Travelmate 5740

Also I am using Visual Studio 2013 Ultimate, if that is important. If any other information is needed I will be happy to give it.

And I also need the code to be as compact as possible.

Thanks
Topic archived. No new replies allowed.