IVsSelectionEvents.OnCmdUIContextChanged Method
Reports that the command UI context has changed.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'Declaration
Function OnCmdUIContextChanged ( _
dwCmdUICookie As UInteger, _
fActive As Integer _
) As Integer
int OnCmdUIContextChanged(
uint dwCmdUICookie,
int fActive
)
int OnCmdUIContextChanged(
[InAttribute] unsigned int dwCmdUICookie,
[InAttribute] int fActive
)
abstract OnCmdUIContextChanged :
dwCmdUICookie:uint32 *
fActive:int -> int
function OnCmdUIContextChanged(
dwCmdUICookie : uint,
fActive : int
) : int
Parameters
dwCmdUICookie
Type: System.UInt32[in] DWORD representation of the GUID identifying the command UI context passed in as the rguidCmdUI parameter in the call to GetCmdUIContextCookie.
fActive
Type: System.Int32[in] Flag that is set to true if the command UI context identified by dwCmdUICookie has become active and false if it has become inactive.
Return Value
Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
COM Signature
From vsshell.idl:
HRESULT IVsSelectionEvents::OnCmdUIContextChanged(
[in] VSCOOKIE dwCmdUICookie,
[in] BOOL fActive
);
This method is called by the environment to notify registered VSPackages that a command UI context changed from a Boolean Off to On, or vice versa. Command UI contexts are monitored at the global level by the SVsShellMonitorSelection service. For example, when a command UI context is used to turn on debug mode, the environment notifies all registered VSPackages of this change in mode by calling IVsSelectionEvents::OnCmdUIContextChanged.
.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.