IVsProfferCommands4::AddNamedCommand3 Method (Guid, Guid, String^, UInt32, String^, String^, String^, Object^, UInt32, UInt32, array<Guid>^, UInt32)

 

Adds a named command.

Namespace:   Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.10.0 (in Microsoft.VisualStudio.Shell.Interop.10.0.dll)

int AddNamedCommand3(
	[InAttribute] Guid% pguidPackage,
	[InAttribute] Guid% pguidCmdGroup,
	String^ pszCmdNameCanonical,
	[OutAttribute] unsigned int% pdwCmdId,
	String^ pszCmdNameLocalized,
	String^ pszBtnText,
	String^ pszCmdTooltip,
	Object^ punkImage,
	unsigned int dwCmdFlagsDefault,
	unsigned int cUIContexts,
	array<Guid>^ rgguidUIContexts,
	unsigned int dwUIElementType
)

Parameters

pguidPackage
Type: System::Guid

[in] The package GUID. Use null for addins.

pguidCmdGroup
Type: System::Guid

[in] The GUID for the group to receive the new command. Use GUID_Macro or GUID_AddIn defined in vbapkg.idl.

pszCmdNameCanonical
Type: System::String^

[in] The full name of the command.

pdwCmdId
Type: System::UInt32

[out] The ID for the new command.

pszCmdNameLocalized
Type: System::String^

[in] A localized version of the string. May be null.

pszBtnText
Type: System::String^

[in] The text to display on a button. Use null if the added command isn't a button.

pszCmdTooltip
Type: System::String^

[in] The ToolTip text to display. May be null.

punkImage
Type: System::Object^

[in] The image. This can be a Bitmap, and Icon, or an IPicture.

dwCmdFlagsDefault
Type: System::UInt32

[in] Use zero (0) for the default values to make the command active and visible.

cUIContexts
Type: System::UInt32

[in] The number of contexts pointed to by the rgguidUIContexts parameter.

rgguidUIContexts
Type: array<System::Guid>^

[in] An array of GUIDs for the user interface contexts indicating options for displaying the command. For more information, see the UIContext_ members of VSConstants.

dwUIElementType
Type: System::UInt32

[in] A value from the vsCommandControlType enumeration.

Return Value

Type: System::Int32

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Return to top
Show: