Alex Rivera | Logout

Capturing a Window that is hidden or minimized

Asked 2009-05-06T16:05:15.600
11

I followed this tutorial (there's a bit more than what's listed here because in my code I get a window via mouse click) for grabbing a window as a bitmap and then rendering that bitmap in a different window.

My question:

When that window is minimized or hidden (SW_HIDE) my screen capture doesn't work, so is it possible to capture a window when it is minimized or hidden?

Edit
Report

1 Answer

2

There are WM_PRINT and WM_PRINTCLIENT messages you can send to the window, which cause its contents to be rendered into the HDC of your choice.

However, these aren't perfect: while the standard Win32 controls handle these correctly, any custom controls in the app might not.

answered 2009-05-06T16:09:20.083

Your Answer