create\destroy static splitter during runtime .
Hello,
I've got 2 differnt views and one static splitter between them.
I want that during runtime the user could decide to "Kill" one of the views (and the splitter)
and after that he (she) could bring it back (and the splitter).
How should i do it? what's the general idea/code?
Thanks...
Les.
Re: create\destroy static splitter during runtime .
I think you can't do that becouse static splitter window contains a fixed number of panes and when you create a static splitter window you must at the same time create all panes. So I think you have to craate two Frames one with spliter view one without and copy data from one to another when killing Frame with spliter.
Re: create\destroy static splitter during runtime .
The solution consists of embedding a pointer to a CSplitterWnd in CMainFrame, as opposed to the recommended way of embedding the CSplitterWnd object. Later, when the application needs to switch from the regular view to the splitter window, this splitter window is created on the heap and initialized by using CreateStatic(), while the regular view is destroyed.
For detailed information please see MSDN topic ID: Q196832.