CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1

    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.


  2. #2
    Join Date
    Aug 1999
    Posts
    427

    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.




  3. #3
    Join Date
    Aug 2000
    Location
    Russia, Tomsk
    Posts
    1

    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.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured