IVsUIShell4.CreateToolbarTray(IOleCommandTarget, IVsToolbarTrayHost) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Joint les barres d'outils qui ne sont pas contenues dans un IVsWindowFrame.
public:
int CreateToolbarTray(Microsoft::VisualStudio::OLE::Interop::IOleCommandTarget ^ pCmdTarget, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsToolbarTrayHost ^ % ppToolbarTrayHost);
public:
int CreateToolbarTray(Microsoft::VisualStudio::OLE::Interop::IOleCommandTarget ^ pCmdTarget, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsToolbarTrayHost ^ & ppToolbarTrayHost);
int CreateToolbarTray(Microsoft::VisualStudio::OLE::Interop::IOleCommandTarget const & pCmdTarget, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsToolbarTrayHost const & & ppToolbarTrayHost);
public int CreateToolbarTray (Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget pCmdTarget, out Microsoft.VisualStudio.Shell.Interop.IVsToolbarTrayHost ppToolbarTrayHost);
abstract member CreateToolbarTray : Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget * IVsToolbarTrayHost -> int
Public Function CreateToolbarTray (pCmdTarget As IOleCommandTarget, ByRef ppToolbarTrayHost As IVsToolbarTrayHost) As Integer
Paramètres
- pCmdTarget
- IOleCommandTarget
[in] Cible de commande pour la barre d'outils.
- ppToolbarTrayHost
- IVsToolbarTrayHost
[out] Hôte de la barre d'état de la barre d'outils.
Retours
Si la méthode réussit, retourne S_OK. En cas d'échec, retourne un code d'erreur.
Remarques
Cette méthode est similaire aux alternatives SetupToolbar (), mais vous permet d’attacher des barres d’outils qui ne sont pas contenues dans un IVsWindowFrame , comme des boîtes de dialogue. L' IVsToolbarTrayHost instance qu’il retourne vous permet d’ajouter des barres d’outils et de récupérer le IVsUIElement qui représente l’élément d’interface utilisateur pour la barre d’outils.