单文档拆分问题?
本帖最后由 VisualEleven 于 2013-09-29 11:03:43 编辑 想在单文档中拆分成 2行1列 在第二行拆分成1 列3行 ,在第二行第一列拆分成2行1列
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
// TODO: 在此添加专用代码和/或调用基类
m_wndSplitter.CreateStatic(this,2,1);
m_wndSplitter.SetColumnInfo(0,300,0);
m_wndSplitter.SetRowInfo(0,50,50);
m_wndSplitter2.CreateStatic(&m_wndSplitter,2, 1,WS_CHILD|WS_VISIBLE,m_wndSplitter.IdFromRowCol(0,0));
m_wndSplitter2.CreateView(0,0,RUNTIME_CLASS(xx1234),CSize(100, 300), pContext);
m_wndSplitter2.CreateView(1,0,RUNTIME_CLASS(CMy123123View),CSize(100, 50), pContext);
m_wndSplitter4.CreateStatic(&m_wndSplitter,1, 3,WS_CHILD|WS_VISIBLE,m_wndSplitter.IdFromRowCol(1,0));
m_wndSplitter4.CreateView(0,0,RUNTIME_CLASS(CMy123123View),CSize(100, 100), pContext);
m_wndSplitter4.CreateView(0,1,RUNTIME_CLASS(CMy123123View),CSize(100, 100), pContext);
m_wndSplitter4.CreateView(0,2,RUNTIME_CLASS(CMy123123View),CSize(100, 100), pContext);
m_wndSplitter3.CreateStatic(&m_wndSplitter4,2, 1,WS_CHILD|WS_VISIBLE,m_wndSplitter4.IdFromRowCol(0,0));
m_wndSplitter3.CreateView(0,0,RUNTIME_CLASS(CMy123123View),CSize(100, 100), pContext);
m_wndSplitter3.CreateView(1,0,RUNTIME_CLASS(CMy123123View),CSize(100, 100), pContext);
m_wndSplitter3.SetRowInfo(0,100,50);
m_wndSplitter3.SetColumnInfo(0,100,50);
return true;
}
但是最后在第2行第1列 的拆分 不显示这样的代码有问题么?
[解决办法]
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
// TODO: Add your specialized code here and/or call the base class
m_wndSplitter1.CreateStatic(this, 2, 1);
m_wndSplitter1.CreateView(0, 0, RUNTIME_CLASS(CAAAAView), CSize(100, 100), pContext);
m_wndSplitter2.CreateStatic(&m_wndSplitter1, 1, 3, WS_CHILD
[解决办法]
WS_VISIBLE, m_wndSplitter1.IdFromRowCol(1, 0));
m_wndSplitter2.CreateView(0, 1, RUNTIME_CLASS(CAAAAView), CSize(100, 100), pContext);
m_wndSplitter2.CreateView(0, 2, RUNTIME_CLASS(CAAAAView), CSize(100, 100), pContext);
m_wndSplitter3.CreateStatic(&m_wndSplitter2, 2, 1, WS_CHILD
[解决办法]
WS_VISIBLE, m_wndSplitter2.IdFromRowCol(0, 0));
m_wndSplitter3.CreateView(0, 0, RUNTIME_CLASS(CAAAAView), CSize(100, 100), pContext);
m_wndSplitter3.CreateView(1, 0, RUNTIME_CLASS(CAAAAView), CSize(100, 100), pContext);
return TRUE;
}