Dialog based app. question 
Author Message
 Dialog based app. question

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?



Fri, 02 Apr 2004 03:50:27 GMT  
 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


Fri, 02 Apr 2004 10:07:53 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Dialog Based App Question

2. Question on Dialog based app startup

3. Q: dialog-based app questions .

4. Resizing a dialog based app based on its view's size

5. Modeless dialog in a dialog-based app

6. dialog within dialog based apps

7. Showing taskbar visible dialog from dialog based app

8. 2nd Dialog never appears in Dialog based app

9. Dialog-based app and modal dialog

10. HOWTO: hide dialog when a dialog-based app starts

11. dialog based app making modeless dialogs

12. PBM: Message box not displayed after main dialog box is closed in MFC dialog-based app

 

 
Powered by phpBB® Forum Software