IVsProfferCommands3.AddNamedCommand2 Yöntem

Tanım

Adlandırılmış bir komut ekler. Bu sürüm, bir UI öğesini belirten bir parametreye sahiptir.

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

Parametreler

pguidPackage
Guid

'ndaki Paket GUID 'SI. nullEklentiler için kullanın.

pguidCmdGroup
Guid

'ndaki Yeni komutu alacak grubun GUID 'SI. Vbapkg. IDL içinde tanımlanan GUID_Macro veya GUID_AddIn kullanın.

pszCmdNameCanonical
String

'ndaki Komutun tam adı.

pdwCmdId
UInt32

[yeni komutun KIMLIĞI.

pszCmdNameLocalized
String

'ndaki Dizenin yerelleştirilmiş bir sürümü. Olabilir null .

pszBtnText
String

'ndaki Bir düğme üzerinde görüntülenecek metin. nullEklenen komut bir düğme değilse kullanın.

pszCmdTooltip
String

'ndaki Görüntülenecek araç Ipucu metni. Olabilir null .

pszSatelliteDLL
String

'ndaki Komutu uygulayan bir uydu DLL dosyasının tam yolu. Olabilir null .

dwBitmapResourceId
UInt32

'ndaki Komut için görüntülenecek simgenin kaynak tanımlayıcısı. Bit eşlem yoksa sıfır (0) kullanın.

dwBitmapImageIndex
UInt32

'ndaki Bit eşlem dosyası içindeki bit eşlemin dizini.

dwCmdFlagsDefault
UInt32

'ndaki Komutu etkin ve görünür hale getirmek için varsayılan değerler için sıfır (0) kullanın.

cUIContexts
UInt32

'ndaki Parametresi tarafından işaret edilen bağlamların sayısı rgguidUIContexts .

rgguidUIContexts
Guid[]

'ndaki Komutu görüntüleme seçeneklerini belirten kullanıcı arabirimi bağlamlarının GUID dizisi. Daha fazla bilgi için, UIContext_ üyelerine bakın VSConstants .

dwUIElementType
UInt32

'ndaki Gir. Numaralandırmadaki bir değer vsCommandControlType .

Döndürülenler

Int32

Yöntem başarılı olursa, döndürür S_OK . Başarısız olursa, bir hata kodu döndürür.

Şunlara uygulanır