我用 VC6。0的WinAppWizard建立了一个单文档程序,
自己没有添加一句代码,编译连接都没有问题,可是运行的时候出现下面的
错:   
       Debug Assertion Failed! 
           Program:\studio\SDI.exe 
:            File: winocc.cpp 
:            Line:189 
这是怎么回事啊?如何解决,谢谢

解决方案 »

  1.   

    int CWnd::GetDlgItemText(int nID, LPTSTR lpStr, int nMaxCount) const
    {
    ASSERT(::IsWindow(m_hWnd)); if (m_pCtrlCont == NULL)
    return ::GetDlgItemText(m_hWnd, nID, lpStr, nMaxCount);
    else
    return m_pCtrlCont->GetDlgItemText(nID, lpStr, nMaxCount);
    }Line:189 
         ASSERT(::IsWindow(m_hWnd));So the error is like this:
      pWnd-> GetDlgItemText() or pWnd.GetDlgItemText()
    however pWnd is NULL or the window is destroyed!