CDialog::OnOK

virtual void OnOK( );

Remarks

Called when the user clicks the OK button (the button with an ID of IDOK).

Override this member function to perform the OK button action. If the dialog box includes automatic data validation and exchange, the default implementation of this member function validates the dialog-box data and updates the appropriate variables in your application.

If you implement the OK button in a modeless dialog box, you must override the OnOK member function and call DestroyWindow from within it. Don’t call the base-class member function, because it calls EndDialog, which makes the dialog box invisible but does not destroy it.

CDialog OverviewClass MembersHierarchy Chart

See Also   CDialog::OnCancel, CDialog::EndDialog