[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Creating static splitter windows "dynamically"

Posted on 1997-05-30
4
Medium Priority
?
418 Views
Last Modified: 2013-11-20
Hi,
    Is it OK to create static splitter windows (i.e. with an object of CSplitterWnd and it's CreateStatic function) at various points within the life of an application or should it be done in the frame windows OnCreateClient function call only (as does all of the MFC sample code I have found)?!?  I would like the user to be able to interactively add/remove views (and thus splitter window panes) to an existing MDI
child frame window.  I have a preliminary test app that seems to work OK.  This app embeds additional CSplitterWnd objects within existing CSplitterWnd objects (by specifying the existing CSplitterWnd object as the parent of the new CSplitterWnd object similar to the VIEWX example) at times other than within the frame windows OnCreateClient function.
Has anyone else created "dynamic" static splitter windows and, if so, are there inherent problems in doing so?

Thanks in advance,

Brian Peasron
Vivid Technologies

0
Comment
Question by:bpearson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 4

Expert Comment

by:AVaulin
ID: 1301896
See SAMPLES\MFC\TUTORIAL\SCRIBBLE example how to create dynamic CSplitterWnd.
0
 

Author Comment

by:bpearson
ID: 1301897
Like I said, all the MFC samples I have found (including Scribble with it's dynamic splitters (I need STATIC!)) create the splitter windows in the frame windows OnCreateClient.  What I need to know is can splitter window creation be safely done elsewhere at various times within the life of the application?
0
 
LVL 4

Accepted Solution

by:
mbhakta earned 400 total points
ID: 1301898
Wish life was easier. But there are some short-comings or rather prerequisite requirements for Splitter windows such as the CCreateContext parameter in most of its creation calls which can be only supplied by OnCreateClient. In one of my projects I tried doing the same you are planning to achieve. Off course I didn't work hard on it and finally agreed on making my splitter bar visible/invisible for particular views. Infact I had about 6 view swapping over one another on a SDI document and 2 splitters were made visible and invisble at various instances. I suggest doing this instead of hacking through the MFC maze and not achieving much. Follow the tide!!!
0
 
LVL 2

Expert Comment

by:The Master
ID: 1301899
A friend of mine and I did exactly what you are attempting.  Actually, he started it and I finished it.  It is possible - the hardest part is keeping track of what's beed created and then unwinding them in the correct order so you don't leak memory.  Email me if you'd like more information... bill@lith.com
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Ready to get certified? Check out some courses that help you prepare for third-party exams.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question