Partager via


IVsMonitorSelection.SetCmdUIContext Method

Sets the state of the command UI context to active or inactive.

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

Syntax

'Declaration
Function SetCmdUIContext ( _
    dwCmdUICookie As UInteger, _
    fActive As Integer _
) As Integer
int SetCmdUIContext(
    uint dwCmdUICookie,
    int fActive
)
int SetCmdUIContext(
    [InAttribute] unsigned int dwCmdUICookie, 
    [InAttribute] int fActive
)
abstract SetCmdUIContext : 
        dwCmdUICookie:uint32 * 
        fActive:int -> int
function SetCmdUIContext(
    dwCmdUICookie : uint, 
    fActive : int
) : int

Parameters

  • dwCmdUICookie
    Type: UInt32

    [in] DWORD representation of the GUID identifying the command UI context passed as the rguidCmdUI parameter in the call to GetCmdUIContextCookie.

  • fActive
    Type: Int32

    [out] Flag that is set to true if the command UI context should be set to active and false if it should be set to inactive.

Return Value

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

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsMonitorSelection::SetCmdUIContext(
   [in] VSCOOKIE dwCmdUICookie,
   [in] BOOL     fActive
);

.NET Framework Security

See Also

Reference

IVsMonitorSelection Interface

Microsoft.VisualStudio.Shell.Interop Namespace