Adding a View and Document to an MDI Application

It is possible to add a View/Document from a previous application to an MDI application. Assume that

  1. The View class is CPrevView and is defined in PrevView.h and PrevView.cpp.
  2. The Document class is CPrevDoc and is defined in PrevDoc.h and PrevDoc.cpp.

Adding the classes to the Application

Add a String Resource

Add a document template

Include the Current App Header

The old view and doc contain references to the old application header file. Do not copy that header into the current application. Edit the header files for the view and doc, and change the include for the application header so that it includes the current application's header file.

Run the Application


Adding Other Resources

This is a little trickier, since it requires that the resource.h and the .rc file be edited.

Editing resource.h

Editing the Application's.rc file