IVsMonitorSelection Interface

Definition

Enables VSPackages to receive notification of selection events and to get information about the current project hierarchy, item, element value, and command UI context.

C++/CX
public interface class IVsMonitorSelection
Attributes

Notes to Callers

This interface is implemented by the Visual Studio Shell. You can get it from the SVsShellMonitorSelection service.

Methods

AdviseSelectionEvents(IVsSelectionEvents, UInt32)

Registers a VSPackage for selection event notification.

GetCmdUIContextCookie(Guid, UInt32)

Registers a command UI context GUID and returns cookie value.

GetCurrentElementValue(UInt32, Object)

Returns the value for a particular element.

GetCurrentSelection(IntPtr, UInt32, IVsMultiItemSelect, IntPtr)

Returns the current project hierarchy, project item, and selection container for the current selection.

IsCmdUIContextActive(UInt32, Int32)

Determines whether a specific command UI context is active.

SetCmdUIContext(UInt32, Int32)

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

UnadviseSelectionEvents(UInt32)

Cancels a registration for selection event notification.

Applies to

Product Versions
Visual Studio SDK 2015, 2017, 2019, 2022