IVsProfferCommands3.AddNamedCommand2(Guid, Guid, String, UInt32, String, String, String, String, UInt32, UInt32, UInt32, UInt32, Guid[], UInt32) Método
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Adiciona um comando nomeado. Esta versão tem um parâmetro que especifica um elemento de interface do usuário.
public:
int AddNamedCommand2(Guid % pguidPackage, Guid % pguidCmdGroup, System::String ^ pszCmdNameCanonical, [Runtime::InteropServices::Out] System::UInt32 % pdwCmdId, System::String ^ pszCmdNameLocalized, System::String ^ pszBtnText, System::String ^ pszCmdTooltip, System::String ^ pszSatelliteDLL, System::UInt32 dwBitmapResourceId, System::UInt32 dwBitmapImageIndex, System::UInt32 dwCmdFlagsDefault, System::UInt32 cUIContexts, cli::array <Guid> ^ rgguidUIContexts, System::UInt32 dwUIElementType);
public int AddNamedCommand2 (ref Guid pguidPackage, ref Guid pguidCmdGroup, string pszCmdNameCanonical, out uint pdwCmdId, string pszCmdNameLocalized, string pszBtnText, string pszCmdTooltip, string pszSatelliteDLL, uint dwBitmapResourceId, uint dwBitmapImageIndex, uint dwCmdFlagsDefault, uint cUIContexts, Guid[] rgguidUIContexts, uint dwUIElementType);
abstract member AddNamedCommand2 : Guid * Guid * string * uint32 * string * string * string * string * uint32 * uint32 * uint32 * uint32 * Guid[] * uint32 -> int
Public Function AddNamedCommand2 (ByRef pguidPackage As Guid, ByRef pguidCmdGroup As Guid, pszCmdNameCanonical As String, ByRef pdwCmdId As UInteger, pszCmdNameLocalized As String, pszBtnText As String, pszCmdTooltip As String, pszSatelliteDLL As String, dwBitmapResourceId As UInteger, dwBitmapImageIndex As UInteger, dwCmdFlagsDefault As UInteger, cUIContexts As UInteger, rgguidUIContexts As Guid(), dwUIElementType As UInteger) As Integer
Parâmetros
- pguidPackage
- Guid
no O GUID do pacote. Use null para AddIns.
- pguidCmdGroup
- Guid
no O GUID do grupo para receber o novo comando. Use GUID_Macro ou GUID_AddIn definido em vbapkg. idl.
- pszCmdNameCanonical
- String
no O nome completo do comando.
- pdwCmdId
- UInt32
[ID do Veja para o novo comando.
- pszCmdNameLocalized
- String
no Uma versão localizada da cadeia de caracteres. Pode ser null.
- pszBtnText
- String
no O texto a ser exibido em um botão. Use null se o comando adicionado não for um botão.
- pszCmdTooltip
- String
no O texto da dica de ferramenta a ser exibida. Pode ser null.
- pszSatelliteDLL
- String
no O caminho completo para uma DLL satélite que implementa o comando. Pode ser null.
- dwBitmapResourceId
- UInt32
no O identificador de recurso para o ícone a ser exibido para o comando. Use zero (0) se não houver bitmap.
- dwBitmapImageIndex
- UInt32
no O índice do bitmap no arquivo de bitmap.
- dwCmdFlagsDefault
- UInt32
no Use zero (0) para os valores padrão para tornar o comando ativo e visível.
- cUIContexts
- UInt32
no O número de contextos apontados pelo rgguidUIContexts parâmetro.
- rgguidUIContexts
- Guid[]
no Uma matriz de GUIDs para contextos de interface do usuário que indica opções para exibir o comando. Para obter mais informações, consulte a UIContext_ membros de VSConstants .
- dwUIElementType
- UInt32
no Valores. Um valor da enumeração vsCommandControlType.
Retornos
Se o método for bem-sucedido, retornará S_OK. Se falhar, retornará um código de erro.