Manipulating modal box controls 
Author Message
 Manipulating modal box controls

Since you basically stop program execution with DoModal() when you go to
open a modal dialog box, how do you update the controls on the dialog while
the box is up?  An example would be a progress bar control.

-mk



Fri, 24 Oct 2003 20:47:24 GMT  
 Manipulating modal box controls
From within the dialog you can either use DoDataExchange or you can explicitly
update the progress bar. If you want to have a dialog that is updated from
within the app while it is up, you need to use a modeless dialog.

Quote:

> Since you basically stop program execution with DoModal() when you go to
> open a modal dialog box, how do you update the controls on the dialog while
> the box is up?  An example would be a progress bar control.

Jim [VC/MFC MVP]
To send mail, change spam-me-not to msn


Fri, 24 Oct 2003 21:52:05 GMT  
 Manipulating modal box controls
Michael,

Basically, program execution does not stop when the DoModal() called -- far
from it -- you app is still very much alive and well....

MFC will disable the parent window of the Modal Dialog box, meaning that it
will no longer respond to user input -- the control on the parent becomes
inactive, but that parent window is still very much able to receive and
respond to messages.

The Modal Dialog box is made visible, receives focus, and becomes the active
window after the call to DoModal.  As far as updating the controls on the
Dialog box, there are several methods available.  For instance, for the
Progress Bar, you can subclass the control using Class Wizard, and then call
the SetPos method during processing to provide real-time feedback to the
user.

regards
Roy Fine


Quote:
> Since you basically stop program execution with DoModal() when you go to
> open a modal dialog box, how do you update the controls on the dialog
while
> the box is up?  An example would be a progress bar control.

> -mk



Fri, 24 Oct 2003 23:00:09 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Active X control not displayed in a modal dialog box in a dll

2. CTabCtrl within a modal dialog box, keyboard control

3. Question about using the Progress control in a modal dialog box

4. List boxes in Modal Dialog Box

5. Modeless dialog box together with modal dialog box

6. Manipulating message box

7. Manipulating .Wav files or Voice Recorder Control With Playback

8. Manipulating controls at runtime?

9. manipulating server controls in the Codebehind .cs file

10. Manipulating of Controls at Launch Time

11. Problem with manipulating ComboBox's Edit Control!

12. Manipulate Control states

 

 
Powered by phpBB® Forum Software