Re: using CClientDC::BitBlt() to capture only the client window
It is the same bitmap as anyother bitmap.
What you have to do is have a bitmap as a member of your view class, draw to
that, and in response to WM_PAINT, you would bitblt to the screen.
But like I asked you in another post, what type of application are you
writing? Give us a little detail about what you are trying to accomplish.
There are multiple solutions to your problem, and without knowing what type
of UI you are providing it will be hard to give a good answer.
If you are writing a paint like program you would use a memory bitmap, if
you are writing a freehand type program you would need a different approach.
But the for memory bitmap:
class CMyView : public CView
//create the bitmap according to the size the user specifies or
//When you need to draw something on the screen, don't draw on the screen
//draw on the bitmap by selecting it into the memory dc and drawing on the
int SaveDC = m_MemDC.SaveDC();
//when you need to paint, simply draw on the screen what is in the memory
int SavedDC = m_MemDC.SaveDC();
"nexolite" <firstname.lastname@example.org> wrote in message
Please tell me where is that bitmap and how can I use that?
"Joseph M. Newcomer" wrote:
This seems the wrong approach. Why do you use BitBlt in this fashion?
should work on the bitmap representation in memory, and only use BitBlt
to draw it to the
screen. Once it is on the screen, the pixels are ignored by your
program, and would never
be "recaptured" in the fashion you are attempting.
On Wed, 18 Feb 2009 08:58:07 -0800, nexolite
I am trying to create a application similar to MS paint , so I am
BitBlt() to capture the drawing area that is the window of my
did the following:
*To Capture the scrren*
*To display the screen back*
Now what happens is that the complete screen, the screen including the
portion that is outside my application window gets drawn into the
window ,so what must be done so that it captures the screen area of my
application window only?
Joseph M. Newcomer [MVP]
MVP Tips: http://www.flounder.com/mvp_tips.htm