CWinApp::AddDocTemplate

This method adds 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.

void AddDocTemplate(
CDocTemplate* pTemplate ); 

Parameters

  • pTemplate
    Specifies a pointer to the CDocTemplate to be added.

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);
     // ...
}

Requirements

**  Windows CE versions:** 1.0 and later
  Header file: Declared in Afxwin.h
  Platform: H/PC Pro, Palm-size PC, Pocket PC

See Also

CSingleDocTemplate