how to snapshot canvas while off-screen
Posted on 2003-03-18
I need to snapshot the canvas of a form containing an active-x control... when it is placed off the screen.
To perform this for a form that is visible on screen I can use the following type of technique:
FormDC := GetWindowDC( Aform.handle);
BitBlt(bmp.Canvas.Handle, 0, 0, Width, Weight,
FormDC, 0, 0, SRCCOPY);
Unfortunately, if I move the form to co-ordinates that are off screen (e.g. 5000,5000) the canvas copying just gives me a white image.
I have tried to understand if GetDCEx could be the answer, to get a DC that is not clipped by being off the screen. But I couldn't work it out.
Can anyone help?