分割窗体时的错误
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
// TODO: Add your specialized code here and/or call the base class
if(!m_wndSplitter1.CreateStatic(this,1,2))
retern FALSE;
return TRUE;
//return CFrameWnd::OnCreateClient(lpcs, pContext);
}
编译时通过,运行时提示错误
Debug Assertion Failed!
file:winsplit.cpp
line:364
为什么????
[解决办法]
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
// TODO: Add your specialized code here and/or call the base class
if(!m_wndSplitter1.CreateStatic(this,1,2))
retern FALSE;
m_wndSplitter1.CreateView(0, 0, RUNTIME_CLASS(CYourView), CSize(100,100), pContext);
return TRUE;
// return CFrameWnd::OnCreateClient(lpcs, pContext);
}
[解决办法]
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
// TODO: Add your specialized code here and/or call the base class
if(!m_wndSplitter1.CreateStatic(this,1,2))
retern FALSE;
m_wndSplitter1.CreateView(0, 0, RUNTIME_CLASS(CYourView1), CSize(100,100), pContext);
m_wndSplitter1.CreateView(0, 1, RUNTIME_CLASS(CYourView2), CSize(100,100), pContext);
return TRUE;
// return CFrameWnd::OnCreateClient(lpcs, pContext);
}