想切分成三块,切分成两行,第一行再分成两列.切分成功,但是运行时横线默认在窗口最顶端,所以只能看到第二行,把横线拉下来才能看到3块,不知道为什么会这样.
我目的是想运行时默认就显示切分好的3块.求解决办法!
代码如下:
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext) 
{
CRect rect;
GetClientRect(&rect); // 将窗口分为2行1列
if(!m_wndSplitter.CreateStatic(this, 2, 1)) return false;

// 将CInputView连接到第1行
m_wndSplitter.CreateView(1, 0, RUNTIME_CLASS(CInputView), CSize(rect.Width(), 3*rect.Height()/10), pContext); // 将第0行第0列再分为1行2列
if(!m_wndSplitter1.CreateStatic(&m_wndSplitter, 1, 2, WS_CHILD|WS_VISIBLE, 
m_wndSplitter.IdFromRowCol(0, 0))) return FALSE;

// 将CTableView类连接到0行第0个分栏
m_wndSplitter1.CreateView(0, 0, RUNTIME_CLASS(CTableView), CSize(rect.Width()/4, 7*rect.Height()/10), pContext);
// 将CResultView连接到第0行第1个分栏
m_wndSplitter1.CreateView(0, 1, RUNTIME_CLASS(CResultView), CSize(3*rect.Width()/4, 7*rect.Height()/10), pContext);

// m_pLeftPanel = (CLeftPanel *)m_wndSplitter.GetPane(0, 0);
// m_pLeftPanel->m_pRightPanel = (CRightPanel *)m_wndSplitter.GetPane(0, 1);
// Set the left pane as the active view
// SetActiveView((CView*) m_wndSplitter.GetPane(0, 0));

return true;
// return CFrameWnd::OnCreateClient(lpcs, pContext);
}