DoModal
Call this member function to invoke the modal dialog box and return the dialog-box result when done.
int DoModal( HWND hWndParent = NULL, DWORD dwOptions = 0, LPCSTR OpsName = NULL )
The ID of the button click to close the dialog box, or -1 if the dialog cannot be loaded for whatever reason.
EX1
#include <..\OriginLab\DialogEx.h> #define IDC_EDIT1 1001 void Dialog_DoModal(Dialog& MyDlg) { MyDlg.DoModal(GetWindow()); }
Dialog.h