CWinApp::AddDocTemplate

voidAddDocTemplate(CDocTemplate*pTemplate);

Parameters

pTemplate

A pointer to the CDocTemplate to be added.

Remarks

Call this member function to add a document template to the list of available document templates that the application maintains. You should add all document templates to an application before you call RegisterShellFileTypes.

Example

BOOL CMyApp::InitInstance()
{
   // ...
   // The following code is produced by AppWizard when you
   // choose the MDI (multiple document interface) option.
   CMultiDocTemplate* pDocTemplate;
   pDocTemplate = new CMultiDocTemplate(
      IDR_MYTYPE,
      RUNTIME_CLASS(CMyDoc),
      RUNTIME_CLASS(CMDIChildWnd),        // standard MDI child frame
      RUNTIME_CLASS(CMyView));
   AddDocTemplate(pDocTemplate);
     // ...
}

CWinApp OverviewClass MembersHierarchy Chart

See Also   CWinApp::RegisterShellFileTypes, CMultiDocTemplate, CSingleDocTemplate