关于嵌套拆分窗口。
在CMainFrame定义
CSplitterWnd m_sp1,m_sp2,m_sp3;
然后再
if(
!m_sp1.CreateStatic(this,1,2)||
!m_sp1.CreateView(0,1,RUNTIME_CLASS(CConnectionView),CSize(0,0),pContext)||
!m_sp2.CreateStatic(&m_sp1,2,1,WS_CHILD|WS_VISIBLE)||
!m_sp2.CreateView(1,0,RUNTIME_CLASS(CSendView),CSize(0,0),pContext)||
!m_sp3.CreateStatic(&m_sp2,1,2,WS_CHILD|WS_VISIBLE)||
!m_sp3.CreateView(0,0,RUNTIME_CLASS(CChatView),CSize(350,0),pContext)||
!m_sp3.CreateView(0,1,RUNTIME_CLASS(CDrawView),CSize(0,0),pContext)
)
return FALSE;
CRect rect;
this->GetClientRect( &rect );
m_sp1.SetColumnInfo(0, rect.Width()/2*3, 10);
m_sp1.SetColumnInfo(1, rect.Width()/1*3, 10);
m_sp1.RecalcLayout();
m_sp2.SetRowInfo(0, rect.Height()/3*4, 10);
m_sp2.SetRowInfo(1, rect.Height()/1*4, 10);
m_sp2.RecalcLayout();
SetActiveView((CView*)m_sp2.GetPane(1,0));
return TRUE;