- Repainting device context
- Posted by Tristan on August 22nd, 2003
I've got an application which calls some code to draw
to the graphics context of the current form when a
button is pressed:
CDCDrawDlg::OnOK()
{
CClientDC canvas(this);
DoDrawing(canvas);
}
I don't want what is drawn to disappear but if I
call my drawing code from the OnPaint() event handler then
the drawing will happen whether or not the button has been
pressed (i.e. straight away).
How can I ensure what has been drawn to the graphics
context remains persistent on the form in such a case.
Many thanks
Tristan.
- Posted by Tim Robinson on August 22nd, 2003
In OnOK, set a member variable to true. In OnPaint, check if that variable
has been set.
--
Tim Robinson (MVP, Windows SDK)
http://www.themobius.co.uk/
"Tristan" <tristan_sehgal@yahoo.co.uk> wrote in message
news:7f5eb42c.0308220053.5c46a38c@posting.google.c om...
- Unloading a disabled graphics driver while an application still has a device context handle to it (Drivers) by Tim
- Writing data to a Printer Device Context (Drivers) by leojose
- Screen refresh/repainting problems (Desktops) by werewolf
- How to BitBlt() on MSN 6.0 Device Context? (Development Resources) by Leon
- Re: Polygon-clipping in a memory device context (Development Resources) by Norman Bullen

