Compartilhar via


IVsToolWindowToolbarHost3.AddToolbar3 Method

Definition

Specifies the drop target to handle drop operations over the toolbar area and the command target to be used for the commands on it.

public int AddToolbar3 (Microsoft.VisualStudio.Shell.Interop.VSTWT_LOCATION dwLoc, ref Guid pguid, uint dwId, Microsoft.VisualStudio.OLE.Interop.IDropTarget pDropTarget, Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget pCommandTarget);
abstract member AddToolbar3 : Microsoft.VisualStudio.Shell.Interop.VSTWT_LOCATION * Guid * uint32 * Microsoft.VisualStudio.OLE.Interop.IDropTarget * Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget -> int
Public Function AddToolbar3 (dwLoc As VSTWT_LOCATION, ByRef pguid As Guid, dwId As UInteger, Optional pDropTarget As IDropTarget, Optional pCommandTarget As IOleCommandTarget) As Integer

Parameters

dwLoc
VSTWT_LOCATION

[in] Specifies the location of the toolbar within the tool window. Values are taken from the VSTWT_LOCATION enumeration.

pguid
Guid

[in] The GUID of the toolbar's menu group.

dwId
UInt32

[in] The identifier that, in combination with pguid, identifies the toolbar to be added.

pDropTarget
IDropTarget

[in, optional] The drop target.

pCommandTarget
IOleCommandTarget

[in, optional] The command target. If this parameter is null, the toolbar host's own command target is used.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Applies to