William
Thu Apr 13 09:29:12 CDT 2006
<daveparkinson@gmail.com> wrote in message
news:1144886411.973151.184110@g10g2000cwb.googlegroups.com...
> I want to copy the way say window1 is currently displayed (in terms of
> what has been painted).
If you are asking you can you create a bitmap, say, from a window, so that
you could then print it or display it, oe redisplay it someehere else, then
the MS sample WinCap (for window capture) demonstrates the Graphics Device
Interface (GDI) functions that you would need to use:
http://support.microsoft.com/kb/q97193/
> This is because I now need to call a command that
> will send window1 to all black.
I don't know what you mean. If the window is yours, just paint its client
area with a black brush. If it is not, what you want to do is nasty at both
the user and technical levels.
> Now I want to paste in the way window1 looked, which
> I have copied in step1.
Paste to the clipboard? If so, you create a bitmap of the image you want to
paste and call (assuming that your application owns the clipboard)
SetClipboardData().
If on the other hand, what you are really trying to do is take over the
painting for a window that is not yours then you are in for an awful lot of
work.
Regards,
Will