Udostępnij za pośrednictwem


Source.ExecMarkerCommand(IVsHiddenRegion, Int32) Method

Definition

Executes the specified command on the specified region.

public:
 virtual int ExecMarkerCommand(Microsoft::VisualStudio::TextManager::Interop::IVsHiddenRegion ^ region, int cmd);
public:
 virtual int ExecMarkerCommand(Microsoft::VisualStudio::TextManager::Interop::IVsHiddenRegion ^ region, int cmd);
 virtual int ExecMarkerCommand(Microsoft::VisualStudio::TextManager::Interop::IVsHiddenRegion const & region, int cmd);
public virtual int ExecMarkerCommand (Microsoft.VisualStudio.TextManager.Interop.IVsHiddenRegion region, int cmd);
abstract member ExecMarkerCommand : Microsoft.VisualStudio.TextManager.Interop.IVsHiddenRegion * int -> int
override this.ExecMarkerCommand : Microsoft.VisualStudio.TextManager.Interop.IVsHiddenRegion * int -> int
Public Overridable Function ExecMarkerCommand (region As IVsHiddenRegion, cmd As Integer) As Integer

Parameters

region
IVsHiddenRegion

An IVsHiddenRegion object representing the hidden region to apply the command to.

cmd
Int32

A value from the MarkerCommandValues enumeration specifying the command to execute.

Returns

If successful, returns S_OK; otherwise, returns an error code. If support for commands on a hidden region is not needed, returns E_NOTIMPL.

Implements

Remarks

When a user right-clicks on a hidden region marker, a context menu is displayed. The GetMarkerCommandInfo method is called to obtain the commands to display on the menu. When the user selects a command from the menu, the ExecMarkerCommand method is called. Only the commands from the MarkerCommandValues enumeration can be supported in this way.

The base method always returns E_NOTIMPL.

Applies to