BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext) 
{
// TODO: Add your specialized code here and/or call the base class
//将窗口分成两行一列
if (!m_wndSplitter.CreateStatic(this,1,0))
{//查看分割是否成功
return FALSE;
}
if (!m_wndSplitter.CreateView(0,0,RUNTIME_CLASS(CChattersListView),CSize(150,100),pContext)
/*||!m_wndSplitter.CreateView(1,0,RUNTIME_CLASS(CChatView),CSize(300,300),pContext)*/)
{
m_wndSplitter.DestroyWindow();
return FALSE;
}
CRect rc;
GetClientRect(rc );
m_wndSplitter.SetRowInfo( 0, rc.bottom /2, 0 );
return TRUE;
//return CFrameWnd::OnCreateClient(lpcs, pContext);
}
运行时错误如下:Debug Assertion Failed!Programe:.....代码\samples\0522\ChatServer\Debug\ChatServer.exefile:winsplit.cppline:151