RenderAddTemplate

更新 : 2007 年 11 月

テンプレート ファイルを処理します。オプションで、そのファイルをプロジェクトに追加できます。

function RenderAddTemplate( 
      strTemplateFile, 
      strProjectFile, 
      ProjToAddTo, 
      bOpen  
);

パラメータ

  • strTemplateFile
    テンプレート ファイルの名前だけを指定します。TEMPLATES_PATH に対する相対パスは含みません。

  • strProjectFile
    作成される新しいファイルの名前。この文字列には PROJECT_PATH に対する相対パスを指定できます。

  • ProjToAddTo
    プロジェクト オブジェクトです。作成されるファイルをプロジェクトに追加する必要がある場合は、プロジェクト名を指定します。ファイルをプロジェクトに追加しない場合は、省略するか false を指定します。

  • bOpen
    true を指定すると、ファイルをプロジェクトに追加した後、既定のエディタで開きます。

解説

この関数を呼び出して、テンプレート ファイルを処理します。オプションで、そのファイルをプロジェクトに追加できます。

使用例

// Declare the project path and the template path.
var strProjectPath = wizard.FindSymbol("PROJECT_PATH");
var strTemplatePath = wizard.FindSymbol("TEMPLATES_PATH");
// Declare the template header and implementation files.
var strTemplateHeader = wizard.FindSymbol("TEMPLATE_HEADER");
var strTemplateImpl = wizard.FindSymbol("TEMPLATE_IMPL");
// Render the template strTemplateHeader and open it in the editor.
RenderAddTemplate(strTemplateHeader, strHeaderFile, selProj, true); 
// Render the template strTemplateImpl, but do not open it 
// in the editor.
RenderAddTemplate(strTemplateImpl, strImplFile, selProj, false);

参照

処理手順

カスタム ウィザードの作成

概念

共通の JScript 関数による C++ ウィザードのカスタマイズ

ウィザードのデザイン

その他の技術情報

C++ ウィザードの JScript 関数