IVsAddProjectItemDlg2::AddProjectItemDlgTitledEx Method (UInt32, Guid, IVsProject^, UInt32, String^, String^, String^, String^, String^, String^, String^, Int32)
Provides additional functionality to the AddProjectItemDlgTitled method such as treeview, help, and default directory selection and expansion.
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
int AddProjectItemDlgTitledEx( unsigned int itemidLoc, [InAttribute] Guid% rguidProject, IVsProject^ pProject, unsigned int grfAddFlags, String^ lpszDlgTitle, String^ lpszTreeViewTitle, String^ lpszHelpTopic, String^ lpszExpand, String^ lpszSelect, String^% pbstrLocation, String^% pbstrFilter, [OutAttribute] int% pfDontShowAgain )
Parameters
- itemidLoc
-
Type:
System::UInt32
[in] Item identifier of the folder in the project to which items should be added. This is useful only for directory-based projects. Non-directory-based projects pass VSITEMID_ROOT. The Add Item dialog box does not use the parameter except to pass it back to AddItem.
- rguidProject
-
Type:
System::Guid
[in] Identifier for the project type. This identifier should be registered under the Projects subkey of the Microsoft Visual Studio registry key. The dialog box uses the following information under that key:
ItemTemplateDir value, which should contain the path to the directory containing item templates for this project type.
Filters key, which is used to construct open filters for the Existing tab.
The dialog box displays items and filters specific to this project type.
- pProject
-
Type:
Microsoft.VisualStudio.Shell.Interop::IVsProject^
[in] Pointer to the IVsProject3 interface the dialog box uses to generate default names for each item by calling the interface's GenerateUniqueItemName method and to cause items to be added to the project by calling the AddItem method.
- grfAddFlags
-
Type:
System::UInt32
[in] Flag values that modify the behavior of the dialog box. Values are taken from the __VSADDITEMFLAGS enumeration.
- lpszDlgTitle
-
Type:
System::String^
[in] Dialog box caption.
- lpszTreeViewTitle
-
Type:
System::String^
[in] Treeview caption. null == "Categories".
- lpszHelpTopic
-
Type:
System::String^
[in] The name of the Help topic. null == "vs.add[new|existing] item.".
- lpszExpand
-
Type:
System::String^
[in] The directory to select or expand by default.
- lpszSelect
-
Type:
System::String^
[in] Item to select.
- pbstrLocation
-
Type:
System::String^
[in, out] Pointer to the location field (initial/final value). This parameter is used only if you specify a value of VSADDITEM_ShowLocationField. To have the project implement sticky behavior, which is the recommended behavior, for the location field, pass the last location field value back in when you open the dialog box again.
- pbstrFilter
-
Type:
System::String^
[in, out] Value of the filter string on the Existing tab. Specify a value of VSADDITEM_AllowStickyFilter instead of VSADDITEM_AllowStickyFilter is set. To have the project implement a sticky behavior for the filter field, which is the recommended behavior, pass the last filter field value back in when you open the dialog box again.
- pfDontShowAgain
-
Type:
System::Int32
[out] Indicator of whether the user selected or cleared the Don't Show This Dialog Again option. This parameter is used only if you specify VSADDITEM_ShowDontShowAgain. To implement the option, which is the recommended behavior, call directly the last selected item template's AddItem method. Typically, a project maintains a separate Don't Show Again option for each item type, such as Form, Module, and Class.
Return Value
Type: System::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
From vsshell.idl:
HRESULT IVsAddProjectItemDlg2::AddProjectItemDlgTitledEx( [in] VSITEMID itemidLoc, [in] REFGUID rguidProject, [in] IVsProject *pProject, [in] VSADDITEMFLAGS grfAddFlags, [in] LPCOLESTR lpszDlgTitle, [in] LPCOLESTR lpszTreeViewTitle, [in] LPCOLESTR lpszHelpTopic, [in] LPCOLESTR lpszExpand, [in] LPCOLESTR lpszSelect, [in, out] BSTR *pbstrLocation, [in, out] BSTR *pbstrFilter, [out] BOOL *pfDontShowAgain );