I just want to draw simple shapes in a dialog!
Hi.
I have a static bitmap in a dialog control, and I want to highlight various areas of it with color as the user presses keys.
I have all the logic implemented, but I can't get the redrawing to work properly. Inside Visual C++ claims that you just override OnPaint and do your stuff, but then only the one control I'm messing with gets drawn. Any invalidation of the rest of the dialog makes it go blank.
How can I draw inside a dialog control and have the changes stick?
Thanks.
Re: I just want to draw simple shapes in a dialog!
Have you tried pDialog->UpdateWindow() ?
trap WM_PAINT of teh Child Control and not the dialog
Hi Stokes,
Override the OnPaint of the Dialog Control and not teh dialog.U will have to subclass the dialog control and then trap WM_PAINT in that control.
When the main dialog gets a WM_PAINT,it draws itself and then sendsWM_PAINT to all its children.So if u do ur painting in the handler for WM_PAINT for the child control,then ur visual changes will stick...
-Raj([email protected])