Microsoft Visual Studio 新規作成されるファイルのテンプレートのカスタマイズ

Last-modified: 2006-09-28 (木) 11:27:26

基本

C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\
以下をルートとして考える。

各種ファイルのテンプレート

次に出てくる「root.cpp」と「root.h」は暫定的な名前になっている。
なので、実際にはユーザが入力した名前によって置き換えられるようになっている。
また各ファイル中に出てくる特別な文字列については後述する。

C++関連ファイル

  • \vcprojectitems\hfile.h
  • \vcprojectitems\newc++file.cpp

Managed C++のコントロールライブラリ

  • \VCWizards\mc++winctrllib\templates\1041\assemblyinfo.cpp
  • \VCWizards\mc++winctrllib\templates\1041\root.cpp
  • \VCWizards\mc++winctrllib\templates\1041\root.h

Managed C++のクラスライブラリ

  • \VCWizards\MC++ClassLib\Templates\1041\assemblyinfo.cpp
  • \VCWizards\MC++ClassLib\Templates\1041\root.cpp
  • \VCWizards\MC++ClassLib\Templates\1041\root.h

Managed C++のWindowsフォーム

  • \VCWizards\MC++AppWiz\Templates\1041\assemblyinfo.cpp
  • \VCWizards\MC++AppWiz\Templates\1041\root.cpp
  • \VCWizards\MC++AppWiz\Templates\1041\root.h

MFC DLL

  • \VCWizards\mfcdllwiz\templates\1041\root.cpp
  • \VCWizards\mfcdllwiz\templates\1041\root.h

Win32

  • \VCWizards\win32wiz\templates\1041\root.cpp
  • \VCWizards\win32wiz\templates\1041\root.h

各種ファイル中に出てくる特別な値

基本的に、「[!」で始まるものが特別扱いとなる。

[!output PROJECT_NAME]
プロジェクト名で置き換えられる(ユーザ指定)
[!output UPPER_CASE_PROJECT_NAME]
大文字のプロジェクト名(ユーザ指定)
[!output SAFE_NAMESPACE_NAME]
安全な名前空間名・・・ソリューション名かプロジェクト名。
[!output SAFE_ITEM_NAME]
不明
[!output APP_CLASS]
不明
[!output APP_BASE_CLASS]
不明
[!output CHILD_FRAME_HEADER]
不明
[!output APP_HEADER]
不明
[!output MAIN_FRAME_HEADER]
不明
[!output INPLACE_FRAME_HEADER]
不明
[!output ROWSET_HEADER]
不明
[!output DOC_HEADER]
不明
[!output TREE_VIEW_HEADER]
不明
[!output VIEW_HEADER]
不明