IVsSelectionEvents::OnCmdUIContextChanged Method (UInt32, Int32)
Reports that the command UI context has changed.
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
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::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
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.