I'm a Windows programming beginner, been programming DOS for some time, starting to make the switch and I'm having a niggly bit of trouble trying to display a messagebox immediately after a dialog.DoModal() . Has anyone out there seen this type of behaviour where any messagebox call after a dialog box fails to be displayed? Did I miss something obvious? The application was created as an simple MFC GUI app. Your help is much appreciated. //********************************************************************* dlg.m_strWarningtext.Format(strMsgBuf); nResponse = dlg.DoModal(); // >>>>> At this point, any messagebox call returns IDOK without even being displayed. if (nResponse == IDOK) { // Do stuff sprintf(strMsgBuf,"Messagebox text "); nRetVal = MessageBox( NULL, (LPCTSTR)strMsgBuf, "Error", MB_OK | MB_ICONERROR ); // >>>>> nRetVal is always == IDOK and the messagebox won't display } else if (nResponse == IDCANCEL) { // Do stuff } //*********************************************************************
K
KeithW
@KeithW