Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Attaches toolbars that are not contained inside a IVsWindowFrame.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop.10.0 (in Microsoft.VisualStudio.Shell.Interop.10.0.dll)
Syntax
'Declaration
Function CreateToolbarTray ( _
pCmdTarget As IOleCommandTarget, _
<OutAttribute> ByRef ppToolbarTrayHost As IVsToolbarTrayHost _
) As Integer
int CreateToolbarTray(
IOleCommandTarget pCmdTarget,
out IVsToolbarTrayHost ppToolbarTrayHost
)
int CreateToolbarTray(
[InAttribute] IOleCommandTarget^ pCmdTarget,
[OutAttribute] IVsToolbarTrayHost^% ppToolbarTrayHost
)
abstract CreateToolbarTray :
pCmdTarget:IOleCommandTarget *
ppToolbarTrayHost:IVsToolbarTrayHost byref -> int
function CreateToolbarTray(
pCmdTarget : IOleCommandTarget,
ppToolbarTrayHost : IVsToolbarTrayHost
) : int
Parameters
- pCmdTarget
Type: Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget
[in] The command target for the tool bar.
- ppToolbarTrayHost
Type: Microsoft.VisualStudio.Shell.Interop.IVsToolbarTrayHost%
[out] The toolbar tray host.
Return Value
Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
This method is similar to the SetupToolbar() alternatives, but allows you to attach toolbars that are not contained inside a IVsWindowFrame, such as dialogs. The IVsToolbarTrayHost instance it returns allows you to add toolbars and to retrieve the IVsUIElement that represents the UI element for the toolbar tray.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.