Question

I would like to obtain a BitBlt() screenshot of a control with big height (bigger than screen size) but I don't want to use a correspondingly very tall window. I tried doing BitBlt() on the handle of this control with most of it outside the window's bounds, but only the area that was inside the window got captured. The area outside the window is captured as black.

Is there a way to fix this? E.g. can the control be forced to draw itself in entirety (and not just parts visible on the window), if that is the main problem here?

Was it helpful?

Solution

The control draws itself into the hdc of the window which is clipped to the screen, and also clipped by overlapping windows. You could try sending the control a redraw message with your own (bitmap) hdc. This might work depending on how the control is implemented.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top