I have a SDI with splitters that look like this:
______________
| | |
|View| |
|Tree| ViewList | (fig. 1)
| | |
| | |
|____|_________|
and I am trying to make a second View (Frame) with splitters that look like this:
________________
| | View 2 |
| |____________|
| | | |
|V1 | | |
| |V3 | View 4 | (fig. 2)
| | | |
| | | |
|___|___|________|
The 1. question: How can I switch between the frames (Views)?
The 2. question: How can I create the 2. frame with splitter to look as shown (fig. 2).
It is important for the first version, that I can switch between to frames. Maybe it is easier to make the second frame like this (no Splitter in a splitter âfig. 3):
_______________
|V 1 | view2 |
|____|__________|
|View| | (fig. 3)
| 3 |View 4 |
| | |
| | |
|____|_________|
Code:
//////////////////////////////////////////////////////////////////////////////////////////
// CMainFrame message handlers
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs,
CCreateContext* pContext)
{
// Wenn Matrix aktiviert ist, dann ueberpruefe diesen Bereich auf Kommunalitat
// may want to read Q99562 and Q141334
if (!m_wndSplitter.CreateStatic(this,1,2))
{
return FALSE;
}
//m_wndSplitterDyn.Create(&m_wndSplitter, 2, 1, CSize ( 1, 1 ), pContext ) ;
CRect rect;
GetClientRect(&rect);
CSize sizeTree = rect.Size();
sizeTree.cx = rect.Width()/4;
if (!m_wndSplitter.CreateView(PANE_ROW_ZERO, eTreeWinPane, RUNTIME_CLASS(CViewTree),
sizeTree, pContext)||
(!m_wndSplitter.CreateView(PANE_ROW_ZERO, eListWinPane, RUNTIME_CLASS(CViewList),
/*CSize(0,0)*/CSize(100,100), pContext)))
{
return FALSE;
}
return TRUE;
//return CFrameWnd::OnCreateClient(lpcs, pContext);
}
///////////////////////////////////////////////////////////////////////////////////////////
Must I use OnCreateClient()function, or there is an alternative?