CMultiDocTemplate

The CMultiDocTemplate class defines a document template that implements the multiple document interface (MDI). An MDI application uses the main frame window as a workspace in which the user can open zero or more document frame windows, each of which displays a document. For a more detailed description of the MDI, see Windows Interface Guidelines for Software Design.

A document template defines the relationships among three types of classes:

An MDI application can support more than one type of document, and documents of different types can be open at the same time. Your application has one document template for each document type that it supports. For example, if your MDI application supports both spreadsheets and text documents, the application has two CMultiDocTemplate objects.

The application uses the document template(s) when the user creates a new document. If the application supports more than one type of document, then the framework gets the names of the supported document types from the document templates and displays them in a list in the File New dialog box. Once the user has selected a document type, the application creates a document class object, a frame window object, and a view object and attaches them to each other.

You do not need to call any member functions of CMultiDocTemplate except the constructor. The framework handles CMultiDocTemplate objects internally.

For more information on CMultiDocTemplate, see Document Templates and the Document/View Creation Process in Visual C++ Programmer’s Guide.

include# <afxwin.h>

Class MembersBase ClassHierarchy Chart

Sample   MFC Sample MULTIPAD

See Also   CDocTemplate, CSingleDocTemplate, CWinApp