Re: show/hide child splitter window
- From: "bhu Boue vidya" <bhuvidya@xxxxxxxxxxxx>
- Date: 8 Aug 2006 23:13:58 -0700
wow, i actually solved my own problem!
the trick is to set the ID of the splitter being hidden to 0, and then
back to the correct ID when being shown again
eg
//hide child splitter 1
::SetWindowLong(m_wndChildSplitter1.GetSafeHwnd(), GWL_ID, 0);
m_wndChildSplitter1.ShowWindow(SW_HIDE);
//show child splitter 2 (m_nID is the correct ID for the child
splitter)
::SetWindowLong(m_wndChildSplitter2.GetSafeHwnd(), GWL_ID, m_nID);
m_wndSplitterMain.ShowWindow(SW_SHOW);
i create both child splitter 1 and 2 with the CORRECT id (and this id
is the same for both, as they both want to live in the same pane of the
splitter parent) - you only need to set the ID to 0 when hiding the
child
and like magic, it works!
bhu Boue vidya wrote:
hi there
i have an app which has, as its main view layout, a series of nested
splitters
one of these nested splitters i want to be a 'dynamically changing
splitter layout'
that is, the user selects a different task to perform, and this
splitter child window 'changes' to show the different task layout
the way i have implemented it so far is each Task manager object
creates its own child splitter window into the same pane of the main
splitter window
thus
in mainfrm:
CSplitterWnd m_wndMainSplitter;
m_wndMainSplitter.CreateStatic(...);
in TaskMgr1:
CSplitterWnd m_wndChildSplitter;
m_wndChildSplitter.CreateStatic(
&m_wndMainSplitter,
...,
m_wndMainSplitter.IdFromRowCol(1, 0);
and similarly in TaskMgr2:
CSplitterWnd m_wndChildSplitter;
m_wndChildSplitter.CreateStatic(
&m_wndMainSplitter,
...,
m_wndMainSplitter.IdFromRowCol(1, 0);
then i use m_wndChildSplitter.ShowWindow(SW_SHOW/SW_HIDE) to try and
switch between child splitters
BUT, this doesn't work!!!
what is the best way to achieve my goals????
tia
bhu
.
- References:
- show/hide child splitter window
- From: bhu Boue vidya
- show/hide child splitter window
- Prev by Date: Re: _stprintf
- Next by Date: console based odbc code in vc++
- Previous by thread: show/hide child splitter window
- Next by thread: how to trace the changes of registry?
- Index(es):
Relevant Pages
|