Jump to content
  • Advertisement

Archived

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

Gropex

Error occured on DoModal()

This topic is 5594 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
Advertisement
The dialog box''s constructor sets the second parameter to NULL by default. Do not pass in anything.

CDlg *dlg = new CDlg;

Kuphryn

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!