Debug Assertion Failed!错误
窗口内容如下:
Debug Assertion Failed!
file:winsplit.cpp
line:414
我怀疑是sdi中的窗口分割出了问题。以下是部分源码:
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
// TODO: Add your specialized code here and/or call the base class
//return CFrameWnd::OnCreateClient(lpcs, pContext);
//将整个窗口分为1行两列
m_SplitterWnd.CreateStatic(this,1,2);
CRect frmRC;
GetClientRect(frmRC);
//在第1行第1列中创建视图窗口
m_SplitterWnd.CreateView(0,0,RUNTIME_CLASS(CHuiView),
CSize(3*frmRC.Width()/4,frmRC.Height()),pContext);
//将m_SplitterWnd窗口的第1行第2列再划分为2行1列
m_ChildWnd.CreateStatic(&m_SplitterWnd,2,1,WS_CHILD|WS_VISIBLE,
m_SplitterWnd.IdFromRowCol(0,1));
//在第1行第1列中创建视图窗口
m_ChildWnd.CreateView(0,0,RUNTIME_CLASS(CYZView),
CSize(frmRC.Width()/4,frmRC.Height()/2),pContext);
//在第2行第1列中创建视图窗口
m_ChildWnd.CreateView(1,0,RUNTIME_CLASS(CZXView),
CSize(frmRC.Width()/4,frmRC.Height()/5),pContext);
m_bSplitterCreated=TRUE;
return true;
}
大家帮忙看看!还可以追加分数的。