CSplitterWnd
I want to create application with splitters like that:
+---+--------+
| | 3 |
| 1 | |
+---+ |
| +--------|
| 2 | |
| | 4 |
+-----------+
| 5 |
+-----------+
1 is CArchitectureView
2 is CConfBNView
3 is CBNView
4 is CPropView
5 is CCROperationView
I use this code:
BOOL CChildFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
if (!m_wndSplitterHorzInf.CreateStatic(this,2,1))
return FALSE;
if (!m_wndSplitterVert.CreateStatic(&m_wndSplitterHorzInf,1,2,WS_CHILD | WS_VISIBLE, m_wndSplitterHorzInf.IdFromRowCol(0, 0)))
return FALSE;
if (!m_wndSplitterHorzSupG.CreateStatic(&m_wndSplitterVert,2,1,WS_CHILD | WS_VISIBLE, m_wndSplitterVert.IdFromRowCol(0, 0)))
return FALSE;
if (!m_wndSplitterHorzSupD.CreateStatic(&m_wndSplitterVert,2,1,WS_CHILD | WS_VISIBLE, m_wndSplitterVert.IdFromRowCol(0, 0)))
return FALSE;
BOOL bFlag=m_wndSplitterHorzSupG.CreateView(0, 0, RUNTIME_CLASS(CArchitectureView), CSize(150,150),pContext);
bFlag &=m_wndSplitterHorzSupG.CreateView(1, 0, RUNTIME_CLASS(CConfBNView), CSize(150,150),pContext);
bFlag &=m_wndSplitterVert.CreateView(0, 1, RUNTIME_CLASS(CBNView), CSize(150,150), pContext);
bFlag &=m_wndSplitterHorzSupD.CreateView(1, 0, RUNTIME_CLASS(CPropView), CSize(150,150), pContext);
bFlag &=m_wndSplitterHorzInf.CreateView(1, 0, RUNTIME_CLASS(CCROperationView), CSize(150,150), pContext);
CRect rect;
GetWindowRect(rect);
m_wndSplitterVert.SetColumnInfo(0,rect.Width()/3,0);
m_wndSplitterHorzSupG.SetRowInfo(0,(rect.Height()/3),0);
m_wndSplitterHorzSupD.SetRowInfo(0,(rect.Height()/3),0);
m_wndSplitterHorzInf.SetRowInfo(0,(rect.Height()/3)*2,0);
return bFlag;
}
I can see 1,2,3 and 5 but not the splitter between 3 and 4.
Thanks for your help
Sanouk

