How to copy from ClientDC to MemDC?
-
Hi I am plotting on the ClientDC. Now at the end of function i want to copy the content of the ClientDc to MemDC, so that it can be used for saving image as BMP or JPG. How to do this? Leave your mark wherever you go
what the hell is a MemDC? Don't try it, just do it! ;-)
-
Hi I am plotting on the ClientDC. Now at the end of function i want to copy the content of the ClientDc to MemDC, so that it can be used for saving image as BMP or JPG. How to do this? Leave your mark wherever you go
A simple BitBlt will do the trick. Just be sure your MemDC has a bitmap selected into it that is the same size and bit depth as your ClientDC.
[
](http://www.canucks.com)Sonork 100.11743 Chicken Little "You're obviously a superstar." - Christian Graus about me - 12 Feb '03 Within you lies the power for good - Use it!
-
A simple BitBlt will do the trick. Just be sure your MemDC has a bitmap selected into it that is the same size and bit depth as your ClientDC.
[
](http://www.canucks.com)Sonork 100.11743 Chicken Little "You're obviously a superstar." - Christian Graus about me - 12 Feb '03 Within you lies the power for good - Use it!
-
Thanks Arends Well what my doubt with bitblt was that it copies from the bitmap to the DC(correct me if i am wrong) So the main problem is that can the bitblt will work for ClientDC. Leave your mark wherever you go
BitBlt copies data from one device context's drawing surface to another device context's drawing surface. CClientDC's drawing surface is the portion of the screen contained in your window, and your MemDC's drawing surface is the bitmap you select into it. A drawing surface can be anything: a memory bitmap, the monitor, a printer, a plotter, etc.
[
](http://www.canucks.com)Sonork 100.11743 Chicken Little "You're obviously a superstar." - Christian Graus about me - 12 Feb '03 Within you lies the power for good - Use it!