This topic is now archived and is closed to further replies.

Error occured on DoModal()

This topic is 5379 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

The program is done in the way as follows, Step1. CDlg *dlg = new CDlg(NULL);//NULL for the parent Wnd Step2. dlg->DoModal(); But I got an nonresponse error occured under Debug Mode. When tracing into the sourcecode,I can reach the following line and the hWndParent is not NULL. //////////////////////////// if (CreateDlgIndirect(lpDialogTemplate, CWnd::FromHandle(hWndParent), hInst)) //////////////////////////// I also trace into the following constructor. /////////////////////////////////// CDialog::CDialog(UINT nIDTemplate, CWnd* pParentWnd) { AFX_ZERO_INIT_OBJECT(CWnd); m_pParentWnd = pParentWnd; m_lpszTemplateName = MAKEINTRESOURCE(nIDTemplate); m_nIDHelp = nIDTemplate; } ////////////////////////////////// m_pParentWnd = pParentWnd;//--->> the pParentWnd is ??? in the variable window. Other information that may be useful. 1. The debug environment was created manually from a release mode. 2. The error did not occure before. I can not figure out what is the reason, does anybody have any clue about that? Any information will be appreicated.

Share this post

Link to post
Share on other sites