Click to See Complete Forum and Search --> : create\destroy static splitter during runtime .
lesner
September 16th, 1999, 04:15 PM
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.
Gregory64
September 16th, 1999, 04:53 PM
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.
Mitya
August 20th, 2000, 07:09 AM
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.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.