Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2005
Visual Studio
Visual Studio SDK
Reference
Interfaces
 IsCmdUIContextActive Method

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
Visual Studio SDK
IVsMonitorSelection.IsCmdUIContextActive Method

Determines whether a specific command UI context is active.

Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in microsoft.visualstudio.shell.interop.dll)

Visual Basic (Declaration)
Function IsCmdUIContextActive ( _
	<InAttribute> dwCmdUICookie As UInteger, _
	<OutAttribute> ByRef pfActive As Integer _
) As Integer
Visual Basic (Usage)
Dim instance As IVsMonitorSelection
Dim dwCmdUICookie As UInteger
Dim pfActive As Integer
Dim returnValue As Integer

returnValue = instance.IsCmdUIContextActive(dwCmdUICookie, pfActive)
C#
int IsCmdUIContextActive (
	[InAttribute] uint dwCmdUICookie,
	out int pfActive
)
C++
int IsCmdUIContextActive (
	[InAttribute] unsigned int dwCmdUICookie, 
	[OutAttribute] int% pfActive
)
J#
int IsCmdUIContextActive (
	/** @attribute InAttribute() */ UInt32 dwCmdUICookie, 
	/** @attribute OutAttribute() */ /** @ref */ int pfActive
)
JScript
JScript does not support passing value-type arguments by reference.

Parameters

dwCmdUICookie

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

pfActive

[out] Flag set to true if the command UI context identified by dwCmdUICookie is active and false otherwise.

Return Value

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

COM Signature

From vsshell.idl:

C++
HRESULT IVsMonitorSelection::IsCmdUIContextActive(
   [in]  VSCOOKIE  dwCmdUICookie,
   [out] BOOL     *pfActive
);

Command UI contexts are associations between a GUID and a command that affects the UI. It is monitored by the SVsShellMonitorSelection service and set by VSPackages as necessary. Typical uses of the command UI context are to activate a particular mode such as design mode or debug mode and to selectively display a toolbar or menu command. To toggle the state of a command UI context, call SetCmdUIContext.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker