CDialog::EndDialog

void EndDialog( int nResult );

Parameters

nResult

Contains the value to be returned from the dialog box to the caller of DoModal.

Remarks

Call this member function to terminate a modal dialog box. This member function returns nResult as the return value of DoModal. You must use the EndDialog function to complete processing whenever a modal dialog box is created.

You can call EndDialog at any time, even in OnInitDialog, in which case you should close the dialog box before it is shown or before the input focus is set.

EndDialog does not close the dialog box immediately. Instead, it sets a flag that directs the dialog box to close as soon as the current message handler returns.

CDialog OverviewClass MembersHierarchy Chart

See Also   CDialog::DoModal, CDialog::OnOK, CDialog::OnCancel