请看这段代码,为什么不能实现我想要的效果?
九重霄 2003-10-20 01:59:28 BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
// TODO: Add your specialized code here and
if (!m_wndSplitter1.CreateStatic(this, 2, 1))
{
TRACE0("Failed to create splitter window\n");
return FALSE;
}
CRect rect;
GetClientRect(&rect);
if(m_wndSplitter.CreateStatic(&m_wndSplitter1,1,2,WS_CHILD|WS_VISIBLE,
m_wndSplitter1.IdFromRowCol(0, 0))==NULL)
return FALSE;
if (!m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CLeftView), CSize(rect.Width()/3, rect.Height()/8*7), pContext))
{
TRACE0("Failed to create left pane view\n");
return FALSE;
}
if (!m_wndSplitter.CreateView(0, 1, RUNTIME_CLASS(CInfoOutView), CSize(0, 0), pContext))
{
TRACE0("Failed to create right pane frame\n");
return FALSE;
}
if (!m_wndSplitter1.CreateView(1, 0, RUNTIME_CLASS(CInfoOutView), CSize(0, 0), pContext))
{
TRACE0("Failed to create Info Out frame\n");
return FALSE;
}
return TRUE ;
}
我要实现的是视图窗口的分割,上面两个并排,下面一个,就象vc一样,可程序出来后,上面的两个高度为 0 ,应该如何改程序。