What is the best way to take screenshots of a Window with C++ in Windows?

GetDC(NULL) + BitBlt()

To capture translucent/alpha/layered windows, you must pass the CAPTUREBLT flag to BitBlt, if you do that, the cursor blinks, read this technet article to find out why.

On NT6+, you might be able to use the Magnification API to do what you want.


You have to get the device context of the window (GetWindowDC()) and copy image (BitBlt()) from it. Depending on what else you know about the application you will use different methods to find which window's handle to pass into GetWindowDC().