在CMainFrame中用Splitter窗口,进行两次拆分:BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext) { // TODO: Add your specialized code here and/or call the base class CRect rc; GetClientRect(&rc); CSize szUpDown(rc.Width(), rc.Height()/2);
{
// TODO: Add your specialized code here and/or call the base class
CRect rc;
GetClientRect(&rc);
CSize szUpDown(rc.Width(), rc.Height()/2);
BOOL bCreateSpltr = m_wndSplitUpDown.CreateStatic( this, 2, 1); //拆分为上下两个窗口 if(m_wndSplitLeftRight.CreateStatic(&m_wndSplitUpDown,1,2,WS_CHILD|WS_VISIBLE,
m_wndSplitUpDown.IdFromRowCol(0, 0))==NULL) //将上面的窗口拆分为左右两部分
return FALSE;
m_wndSplitLeftRight.CreateView(0,0,RUNTIME_CLASS(CGridView), CSize(rc.Width()/2+100, 100),
pContext);//左上窗口创建
m_wndSplitLeftRight.CreateView(0,1,RUNTIME_CLASS(CListView), CSize(rc.Width()/2, 100),
pContext); //右上窗口创建
m_wndSplitUpDown.SetRowInfo(0, rc.Height()/2+100, 0);
m_wndSplitUpDown.CreateView(1,0,RUNTIME_CLASS(CNomalView), CSize(100,100),
pContext); //创建下面窗口 m_wndSplitUpDown.RecalcLayout();
m_wndSplitLeftRight.RecalcLayout(); return bCreateSpltr;
}