Partager via


IVsWindowFrameSwitcher.AddTool Method

Adds a tool to this frame switcher.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.10.0 (in Microsoft.VisualStudio.Shell.Interop.10.0.dll)

Syntax

'Declaration
Function AddTool ( _
    ByRef guidTool As Guid, _
    switchContext As String _
) As Integer
int AddTool(
    ref Guid guidTool,
    string switchContext
)
int AddTool(
    [InAttribute] Guid% guidTool, 
    [InAttribute] String^ switchContext
)
abstract AddTool : 
        guidTool:Guid byref * 
        switchContext:string -> int
function AddTool(
    guidTool : Guid, 
    switchContext : String
) : int

Parameters

  • guidTool
    Type: Guid%

    [in] The GUID of the tool.

  • switchContext
    Type: String

    [in] The value for the group upon which the tool will be activated. See VSConstants.VSSELELEMID for more information.

Return Value

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

Remarks

The tool added should be designed for this purpose since it will not be available as a top level tool. A single tool can be added to multiple contexts by making multiple calls to this method with different switchContext values.

.NET Framework Security

See Also

Reference

IVsWindowFrameSwitcher Interface

Microsoft.VisualStudio.Shell.Interop Namespace