怎么发现并改正这样的错误!
在基于对话框的应用程序中的主对话框中创建一个继承于CEditView类的视图
int CVide_exe3Dlg::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CDialog::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: Add your specialized creation code here
if(!this->m_wndView.Create(NULL,NULL,WS_CHILD | WS_VISIBLE,CRect(0,0,0,0),this,ID_VIEW))
return -1;
return 0;
}
void CVide_exe3Dlg::OnSize(UINT nType, int cx, int cy)
{
CDialog::OnSize(nType, cx, cy);
// TODO: Add your message handler code here
m_wndView.SetWindowPos(NULL,0,0,cx,cy,SWP_DRAWFRAME);
}
应用程序能正常启动,可是关闭对话框,或是在视图中输入字符对会发生错误!
Debug Assertion Failed!
Program:.......
File:dbgheap.c
Line:1011
请各位指教!