I'm trying to take a screenshot of a child window that extends beyond its parent window viewing region. For performance reasons, MS doesn't render this portion and hence my screenshot is only a portion in size. Is there any way I can force it to render the entire window or am I going to have to get down and dirty with some hack to do it?
The method I'm currently using involves creating a destination DC with a DIB where I blit the contents of the source window over. With my bitmap pointer, I save the contents out to a file.
Win32 Clipping
Started by TheNut, Apr 24 2006 02:46 AM
3 replies to this topic
#2
Posted 24 April 2006 - 07:17 PM
I think the way to go is to send the child-window a WM_PAINT-message with a user-defined HDC (probably a memory DC with a bitmap attached).
That should do the trick.
That should do the trick.
#3
Posted 25 April 2006 - 02:25 AM
I just tried out the "WM_PRINT" and "WM_PRINTCLIENT" with no luck. I'm baffled as to why windows doesn't implement this by default in all their windows/controls. I consider this to be a pretty standard feature to have.
I followed this website: http://www.fengyuan....le/wmprint.html, which seems to implement a far more complicated procedure. In fact, in the very end the copy procedure is almost identical to my blitting operation, only that it snakes its way around the windows messages. Unfortuantely, all I get is a white background, no picture. Blitting seems to be the only success I am getting, but it's only a peice of the picture. Bloody hell...
I followed this website: http://www.fengyuan....le/wmprint.html, which seems to implement a far more complicated procedure. In fact, in the very end the copy procedure is almost identical to my blitting operation, only that it snakes its way around the windows messages. Unfortuantely, all I get is a white background, no picture. Blitting seems to be the only success I am getting, but it's only a peice of the picture. Bloody hell...
http://www.nutty.ca - Being a nut has its advantages.
#4
Posted 25 April 2006 - 03:03 AM
Actually, ta hell with windows =P
I spent the last few minutes writing a "panoramic stitch" hack. Works like a dream and 1/10th the hassel =)
I spent the last few minutes writing a "panoramic stitch" hack. Works like a dream and 1/10th the hassel =)
http://www.nutty.ca - Being a nut has its advantages.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












