CWinApp::AddDocTemplate

更新 : 2007 年 11 月

アプリケーションが管理する利用可能なドキュメント テンプレートのリストに、ドキュメント テンプレートを追加します。

void AddDocTemplate(
   CDocTemplate* pTemplate 
);

パラメータ

  • pTemplate
    追加するCDocTemplate へのポインタ。

解説

RegisterShellFileTypes を呼び出す前に、すべてのドキュメント テンプレートをアプリケーションに追加する必要があります。

使用例

   // The following code is produced by the Application Wizard when you
   // choose the MDI (multiple document interface) option.
    CMultiDocTemplate* pDocTemplate;
    pDocTemplate = new CMultiDocTemplate(IDR_MYTYPE,
        RUNTIME_CLASS(CMyDoc),
        RUNTIME_CLASS(CChildFrame), // custom MDI child frame
        RUNTIME_CLASS(CMyView));
    if (!pDocTemplate)
        return FALSE;
    AddDocTemplate(pDocTemplate);

必要条件

ヘッダー : afxwin.h

参照

参照

CWinApp クラス

階層図

CWinApp::RegisterShellFileTypes

CMultiDocTemplate クラス

CSingleDocTemplate クラス

その他の技術情報

CWinApp のメンバ