调用完重载的构造函数之后,却进不去OnInitDialog()
怎么回事啊?

解决方案 »

  1.   

    是否正确继承CDialog,以及你的构造函数如何调用的
      

  2.   


    声明:
    newdialog(CString str);定义:
    newdialog::newdialog(CString str)
    {
    MessageBox(_T("nihao1"),_T("nihao1"));
    url=str;
    }调用:
    newdialog nd(str);
    nd.DoModal();
      

  3.   

    OnInitDialog 是否在newdialog中继承重载...
      

  4.   


    默认构造函数是这样的,调用没问题
    newdialog::newdialog(CWnd* pParent /*=NULL*/)
    : CDialog(newdialog::IDD, pParent)
    {
    url="http://localhost/test2.html";
    }
      

  5.   

    newdialog::newdialog(CString str): CDialog(newdialog::IDD, NULL) 

    MessageBox(_T("nihao1"),_T("nihao1")); 
    url=str; 

    这样你看看行不行!
      

  6.   


    报这样的错误!
    client_test.exe 中的 0x783298c7 (mfc80ud.dll) 处未处理的异常: 0xC0000005: 读取位置 0x00740073 时发生访问冲突
      

  7.   

    错误解决了,谢谢!
    是因为我用CString导致的问题。