
Dialog based app. question
I would suggest making a change: do not draw the shapes on the dialog
itself, but on a window you include in the dialog. There is little
advantage and considerable disadvantage to drawing directly on the
dialog. A shape, once drawn, remains until the pixels are erased, so
to make a shape go away, you need to erase its pixels. This is easy,
if you've done the drawing in the OnPaint handler for your window (and
if you aren't doing it the OnPaint handler, you need to rewrite your
app!); just InvalidateRect(NULL) and the background will be erased,
which erases the object, then the OnPaint handler draws the object you
have selected.
joe
Quote:
>I posted the question below in a C++ newsgroup but was told this newsgroup
>would be more appropriate to answer the question.
>I have created a dialog based application that draws various shapes onto the
>dialog box. All is well and good except I don't know how to have a
>previously selected shape disappear after a new one is selected. How do I
>go about doing this?
Joseph M. Newcomer [MVP]
Web: http://www3.pgh.net/~newcomer
MVP Tips: http://www3.pgh.net/~newcomer/mvp_tips.htm