Request for design suggestions
Posted on 2003-03-30
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.