Microsoft Foundation Classes (mfc.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
CModalDialog::DoModal
CModalDialog                                Up Contents Index Back
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  int DoModal();
 
  Remarks
 
  Invokes the dialog box and returns the dialog box result when done. This
  member function handles all interaction with the user while the dialog
  box is active. This is what makes the dialog box modal; that is, the
  user cannot interact with other windows until the dialog box is closed.
 
  If the user clicks one of the pushbuttons in the dialog box, such as OK
  or Cancel, a message-handler member function, such as OnOK or
  OnCancel, is called to attempt to close the dialog box. The default
  OnOK and OnCancel member functions will end the dialog with results IDOK
  and IDCANCEL, respectively. You can override these message-handler
  functions to alter this behavior.
 
  Return Value
 
  An int value that specifies the value of the <nResult> parameter that
  was passed to the CDialog::EndDialog member function, which is used to
  terminate the dialog box.The return value is -1 if the function could
  not create the dialog box.
 
  See Also
 
  ::DialogBox
 
 
                                     -♦-