Untitled

Started by
1 comment, last by Endurion 17 years, 10 months ago
CFreeSenderDlg dlg; m_pMainWnd = &dlg int nResponse = dlg.DoModal(); if (nResponse == IDOK) { ::MessageBox(0,"ok",0,0); } else if (nResponse == IDCANCEL) { ::MessageBox(0,"ok",0,0); // not pop up; CDialog c(IDD_ABOUTBOX); c.DoModal(); // not pop up; } else { ::MessageBox(0,"操你妈,在那",0,0); } // Since the dialog has been closed, return FALSE so that we exit the // application, rather than start the application's message pump. return FALSE;
Advertisement
hay, what's going on here
daerid@gmail.com
Found a hack-around on CodeProject:

It's obviously a MFC problem. You're using a dialog based app and MFC sets the apps main window handle to your dialog (but doesn't actually need it).

If you simply comment the line:

m_pMainWnd = &dlg

to this:

//m_pMainWnd = &dlg

before the call to DoModal all your messageboxes and dialogs after DoModal should work without problems.

Fruny: Ftagn! Ia! Ia! std::time_put_byname! Mglui naflftagn std::codecvt eY'ha-nthlei!,char,mbstate_t>

This topic is closed to new replies.

Advertisement