Solved

Using an MDI Frame Wnd with an SDI Doc Template

Posted on 1997-02-21
1
461 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
[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
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
lucky13 challenge 11 159
ShiftLeft challenge 21 90
JQuery serialize and unserialize 8 201
Message not shown 5 87
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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 a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

730 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