We recommend using Visual Studio 2017
This documentation is archived and is not being maintained.

Contributing to the Add New Item Dialog Box

A project subtype can provide a complete new directory of items for the Add New Item dialog box by registering Add Item templates under the Projects registry subkey.

This section is located under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Projects in the registry. The registry entries below assume a Visual Studio project aggregated by a hypothetical project subtype. The entries for the Visual Studio project are listed below.



The AddItemTemplates\TemplateDirs subkey contains registry entries with the path to the directory where items made available in the Add New Item dialog box are placed.

The environment automatically loads all of the AddItemTemplates data under the Projects registry subkey. This can include the data for base project implementations as well as the data for specific project subtype types. Each project subtype is identified by a project type GUID. The project subtype can specify that an alternate set of Add Item templates should be used for a particular flavored project instance by supporting the VSHPROPID_ AddItemTemplatesGuid enumeration from __VSHPROPID2 in GetProperty implementation to return the GUID value of the project subtype. If VSHPROPID_AddItemTemplatesGuid property is not specified, the base project GUID is used.

You can filter items in the Add New Item dialog box by implementing the IVsFilterAddProjectItemDlg interface on the project subtype aggregator object. For example, a project subtype that implements a database project by aggregating a Visual Studio project, can filter the Visual Studio specific items from the Add New Item dialog box by implementing filtering, and in turn, can add database project specific items by supporting VSHPROPID_ AddItemTemplatesGuid in GetProperty. For more information on filtering and adding items to the Add New Item dialog box, see Adding Items to the Add New Item Dialog Boxes.