[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 812
  • Last Modified:

Converting from SDI to MDI

Does there exist a simple way (tool) to convert an SDI based program into a MDI based program.
0
dataman
Asked:
dataman
1 Solution
 
mikeblasCommented:
Microsoft provides no such tool.

You can convert from SDI to MDI by:

1) Adding your own CMDIChildWnd-derived class. (You can copy the one from a blank AppWizard app.)

2) Changing your CMainFrame class to derive from CMDIFrameWnd instead of CFrameWnd.

3) Changing your InitInstance() code to register a doc template based on your CMDIChildWnd-derived object instead of your plain object.

4) Hook up code to load the main frame:

CMainFrame* pMainFrame = new CMainFrame;
if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
   return FALSE;
m_pMainWnd = pMainFrame;

5) Add a new menu resource for the frame

6) add the appropriate menu items to the document template window style.

.B ekiM
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now