Modal and Modeless Dialog Boxes
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

Modal and Modeless Dialog Boxes 

You can use class CDialog to manage two kinds of dialog boxes:

  • Modal dialog boxes, which require the user to respond before continuing the program

  • Modeless dialog boxes, which stay on the screen and are available for use at any time but permit other user activities

The resource editing and procedures for creating a dialog template are the same for modal and modeless dialog boxes.

Creating a dialog box for your program requires the following steps:

  1. Use the dialog editor to design the dialog box and create its dialog-template resource.

  2. Create a dialog class.

  3. Connect the dialog resource's controls to message handlers in the dialog class.

  4. Add data members associated with the dialog box's controls and to specify dialog data exchange and dialog data validations for the controls.

See Also

© 2016 Microsoft