?
Solved

Request for design suggestions

Posted on 2003-03-30
2
Medium Priority
?
158 Views
Last Modified: 2013-11-20
I am still a relative beginner to MFC, and as such what I would like to do is ask for general design suggestions, and I will actually give 20 points to the first four answers with good suggestions - I marked the question as worth 20, but they told me that I can post a zero-point question in the main area to ask a moderator to split the points out.  So if someone else answers my question and you have an additional suggestion/idea, please give it - I'd love to hear it.

I am working on a low-level 3D modelling tool.  The way I would like to implement it is to use a splitter view where the left pane is a CFormView and the right pane is the rendering context (I'm using OpenGL).

I'm fairly confident that I know what to do with the right pane, but the left pane I'm not so sure about.  What I would ideally like is to have the dialog in the left pane change based on the user's choice of menu items, i.e. if he wanted to "move the camera" he'd click the Edit/Move Camera... button and the dialog for moving the camera would appear on the left, if he wanted to adjust the properties of one of the lights he'd click Lighting/Light 0... and the dialog for adjusting light 0 would appear on the left etc.  I'll probably have about 17 different dialogs.  The reason I want them to appear on the left instead of just using a CDialog class is because I want them to be interactive, i.e. if they move the camera I want them to be able to see the results in the view pane as they adjust.

I would certainly guess that my CDocument-derived class should house *all* of the above information, i.e. all of the shapes in the project, all of the light settings, all of the geometry settings et al.

Really the only part I'm not sure about is what to do about the left-hand pane, i.e.

Should I create a different CFormView-derived class for every possible dialog, and if so, what's the "best" way to change the view in the left-hand pane?

Should I embed a CPropertySheet on the dialog, remove the tabs, and call SetActivePage based on the user's menu click?

Is the "best practice" something I haven't thought of?

Any suggestions will be entertained.
0
Comment
Question by:DalTXColtsFan
[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
2 Comments
 
LVL 12

Accepted Solution

by:
williamcampbell earned 60 total points
ID: 8241595

  Take a look at this sample.

 http://www.codeguru.com/splitter/mvSplitter.shtml

  This allows you change either side of the spitter with any dialog you like.

  So you setup your 17 Formviews give each a unique ID and using the code above with minimal change will do what you need.



0
 
LVL 2

Author Comment

by:DalTXColtsFan
ID: 8277082
This wasn't really what I was looking for but I'm going to go ahead and accept your comment as an answer because that site is cool - thank you for pointing me to it.  Codeguru has some good stuff doesn't it?  I've also been impressed by Code Project - can't remember if it's www.codeproject.com or www.thecodeproject.com.

I have since figured out (thanks to the help of expertsexchange and "The MFC Answer Book") how to remove all tabs and buttons from a Property Sheet and embed it on a dialog, so I think this is how I'm going to go forward.  I was hoping more for some forewarnings of like if I go that route and use SetActivePage to cycle the pages what problems I'd later have, but I guess I'll find 'em out the hard way!

Thanks again
Joe
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

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Suggested Courses
Course of the Month13 days, 13 hours left to enroll

801 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