Creating Modal Dialog Boxes
To create a modal dialog box, call either of the two public constructors declared in . Next, call the dialog object’s member function to display the dialog box and manage interaction with it until the user chooses OK or Cancel. This management by DoModal is what makes the dialog box modal. For modal dialog boxes, DoModal loads the dialog resource.
See Also Life Cycle of a Dialog Box