Commands2.AddNamedCommand2, méthode
Assembly : EnvDTE80 (dans envdte80.dll)
Command AddNamedCommand2 ( [InAttribute] AddIn AddInInstance, [InAttribute] string Name, [InAttribute] string ButtonText, [InAttribute] string Tooltip, [InAttribute] bool MSOButton, [OptionalAttribute] [InAttribute] Object Bitmap, [OptionalAttribute] [InAttribute] ref Object[] ContextUIGUIDs, [OptionalAttribute] [InAttribute] int vsCommandStatusValue, [OptionalAttribute] [InAttribute] int CommandStyleFlags, [OptionalAttribute] [InAttribute] vsCommandControlType ControlType )
Command AddNamedCommand2 ( /** @attribute InAttribute() */ AddIn AddInInstance, /** @attribute InAttribute() */ String Name, /** @attribute InAttribute() */ String ButtonText, /** @attribute InAttribute() */ String Tooltip, /** @attribute InAttribute() */ boolean MSOButton, /** @attribute InAttribute() */ /** @attribute OptionalAttribute() */ Object Bitmap, /** @attribute InAttribute() */ /** @attribute OptionalAttribute() */ /** @ref */ Object[] ContextUIGUIDs, /** @attribute InAttribute() */ /** @attribute OptionalAttribute() */ int vsCommandStatusValue, /** @attribute InAttribute() */ /** @attribute OptionalAttribute() */ int CommandStyleFlags, /** @attribute InAttribute() */ /** @attribute OptionalAttribute() */ vsCommandControlType ControlType )
Paramètres
- AddInInstance
Obligatoire. L'objet AddIn ajoute la nouvelle commande.
- Name
Obligatoire. La forme courte du nom de votre nouvelle commande. AddNamedCommand2 utilise la préface "Addins.Progid." pour créer un nom unique.
- ButtonText
Obligatoire. Nom à utiliser si la commande est liée à un bouton qui s'affiche sous la forme d'un nom et non d'une icône.
- Tooltip
Obligatoire. Texte qui s'affiche lorsqu'un utilisateur arrête le pointeur de la souris sur un contrôle lié à la nouvelle commande.
- MSOButton
Obligatoire. Indique si l'image du bouton de la commande nommée est une image Office. True = bouton. Si MSOButton est False, le paramètre Bitmap correspond alors à l'ID d'une ressource bitmap 16x16 (et non d'une ressource icône) dans une DLL de ressource Visual C++ qui doit résider dans un dossier portant l'identificateur de paramètres régionaux de la langue (1033 pour l'anglais).
- Bitmap
Facultatif. ID d'une bitmap à afficher sur le bouton.
- ContextUIGUIDs
Facultatif. SafeArray d'identificateurs GUID qui détermine quels contextes d'environnement (mode débogage, mode design, etc.) activent la commande. Consultez DisableFlags.
- vsCommandStatusValue
Facultatif. Détermine si la commande en état désactivé est invisible ou grisée lorsque vous fournissez un ContextUIGUIDs et qu'aucun des identificateurs n'est actuellement actif.
- CommandStyleFlags
Valeur de l'énumération vsCommandStyle. Contrôle le style visuel de toute interface utilisateur ajoutée pour cette commande.
- ControlType
Définit le type de contrôle ajouté quand l'interface utilisateur est créée.