Solved

Using an MDI Frame Wnd with an SDI Doc Template

Posted on 1997-02-21
1
459 Views
Last Modified: 2013-11-20
I have an application that requires a single document interface but I desire that the main frame window have multiple child windows.  Is it possible to use an single document template with a MDIFrameWnd?  

It appears when I try to implement this using the app wizard to generate an SDI and then deriving the MainFrame from CMDIFrameWnd instead of CFrameWnd I don't get a default view associated with the template.  Without a default view, my document doesn't get a change to handle any commands.

What is the best way to implement an SDI app with multiple child windows in its main frame?
0
Comment
Question by:brickb
1 Comment
 
LVL 4

Accepted Solution

by:
mbhakta earned 100 total points
ID: 1300056
There are several ways in MFC to approach this problem.

- Design a CWnd based application. This doesnot use the doc/view architecture. But gives you access to mainframe look-alike facilities. Rule this out if you are using heavy-duty CDocument features.

- Design a CDialog based application. The fastest way to get what  you want. Again no View/doc. There is also a considerable increase in EXE size compared to the normal technique. But you can achieve your goal without any trouble.

- The third which is the most feasible way is to design an SDI application using APP wiz. This way you can use all the CMainframe , doc /view features. Now comes the creation of child windows in the CMainFrame. In MFC you approach this problem in a different way than using regular C. The view is the white area that covers the client are of the CMainFrame. Instead of making your child dialog's children of CMainFrame you use the CView based derived class. Now all child windows will float inside the client area of the CView.

Tip : Remember to kill these child windows before killing the view.


0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to create frequencies of a variable from SAS dataset? 10 125
iSeries FTP Exit Program 8 135
Add content to output file 4 63
format the code in java 6 93
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

786 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