可以运行,但显示的是原来的那个视图,
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
// TODO: Add your specialized code here and/or call the base class
m_split.CreateStatic(this,1,2,WS_CHILD|WS_VISIBLE,AFX_IDW_PANE_FIRST);
m_split.CreateView(0,0,RUNTIME_CLASS(CView1),CSize(100,100),pContext);
m_split.CreateView(0,1,RUNTIME_CLASS(CView2),CSize(100,100),pContext);
SetActiveView((CView*)m_split.GetPane(0,0));
return CFrameWnd::OnCreateClient(lpcs, pContext);
}
m_split是MainFrame的一个变量..
--------------------------------------------------
return TRUE;
CreateView时设定一个视图的宽度,另一个设为0自适应