MSDN里面四个返回值,叉掉应该是IDCANCEL吧,没测试哦 nRet = aboutDlg.DoModal(); // Handle the return value from DoModal. switch ( nRet ) { case –1: AfxMessageBox("Dialog box could not be created!"); break; case IDABORT: // Do something. break; case IDOK: // Do something. break; case IDCANCEL: // Do something. break; default: // Do something. break; };
nRet = aboutDlg.DoModal(); // Handle the return value from DoModal.
switch ( nRet )
{
case –1:
AfxMessageBox("Dialog box could not be created!");
break;
case IDABORT:
// Do something.
break;
case IDOK:
// Do something.
break;
case IDCANCEL:
// Do something.
break;
default:
// Do something.
break;
};