VC 对视图切分了一次 再选某一视图对其切分
急急急
这是一个视图分割的例子,看看吧!
CRect rect;
GetClientRect(rect);
m_wndSplitter1.CreateStatic(this,2,1,WS_CHILD|WS_VISIBLE);
m_wndSplitter2.CreateStatic(&m_wndSplitter1,1,2,WS_CHILD|WS_VISIBLE,m_wndSplitter1.IdFromRowCol(0,0));
m_wndSplitter2.CreateView(0,0,RUNTIME_CLASS(CContainerView),CSize(0,0),pContext);
m_wndSplitter3.CreateStatic(&m_wndSplitter2,2,1,WS_CHILD|WS_VISIBLE,m_wndSplitter2.IdFromRowCol(0,1));
m_wndSplitter3.CreateView(0,0,RUNTIME_CLASS(CChangePoint),CSize(0,0),pContext);
m_wndSplitter3.CreateView(1,0,RUNTIME_CLASS(CTextPackInfo),CSize(0,0),pContext);
m_wndSplitter1.CreateView(1,0,RUNTIME_CLASS(CListPackInfo),CSize(0,0),pContext);
m_wndSplitter1.SetRowInfo(0,static_cast<int>(rect.Height()*0.7),100);
m_wndSplitter1.SetRowInfo(1,static_cast<int>(rect.Height()*0.3),100);
m_wndSplitter2.SetColumnInfo(0,static_cast<int>(rect.Width()*0.8),100);
m_wndSplitter2.SetColumnInfo(1,static_cast<int>(rect.Width()*0.2),100);
m_wndSplitter3.SetRowInfo(0,static_cast<int>(rect.Height()*0.7*0.3),100);
m_wndSplitter3.SetRowInfo(1,static_cast<int>(rect.Height()*0.3*0.7),100);
m_wndSplitter1.RecalcLayout();
m_wndSplitter2.RecalcLayout();
m_wndSplitter3.RecalcLayout();