Steve Loughran wrote:
When I grab a window's (or DC's) contents and save it out as an image for later use, it all works fine unless the window/DC is partially offscreen or overlapped/overlayed by another window. Is there a flag or style I can use to force the window/DC to be updated by the system to prevent this? I know its done to minimize the amount of work the system has to do, but just wondering anyway.

There may be some flags to the Win32 GetDCEx() API that do what you want. Having said that, my gut feeling is that you can't do it this way: I suspect that even if you can get a DC that doesn't have it's siblings clipped, you'll end up copying the corners of the overlapping window ...

I've never tried, but I believe you can do what you want by creating a compatible DC, and then sending a WM_PRINT message to the window, with the DC's handle in the wParam and some flags in the lParam (see MDSN for more info). I think most of the Win32::GUI windows/controls have enough support for this to work.

Regards,
Rob.

Reply via email to