共用方式為


IVsTextMarkerClient.ExecMarkerCommand(IVsTextMarker, Int32) Method

Definition

Executes a command on a specific marker within the text buffer.

public:
 int ExecMarkerCommand(Microsoft::VisualStudio::TextManager::Interop::IVsTextMarker ^ pMarker, int iItem);
public:
 int ExecMarkerCommand(Microsoft::VisualStudio::TextManager::Interop::IVsTextMarker ^ pMarker, int iItem);
int ExecMarkerCommand(Microsoft::VisualStudio::TextManager::Interop::IVsTextMarker const & pMarker, int iItem);
public int ExecMarkerCommand (Microsoft.VisualStudio.TextManager.Interop.IVsTextMarker pMarker, int iItem);
abstract member ExecMarkerCommand : Microsoft.VisualStudio.TextManager.Interop.IVsTextMarker * int -> int
Public Function ExecMarkerCommand (pMarker As IVsTextMarker, iItem As Integer) As Integer

Parameters

pMarker
IVsTextMarker

[in] Pointer to the IVsTextMarker interface for the marker.

iItem
Int32

[in] Command selected by the user from the context menu. For a list of iItem values, see MarkerCommandValues.

Returns

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

Remarks

COM Signature

From textmgr.idl:

HRESULT IVsTextMarkerClient::ExecMarkerCommand(  
   [in] IVsTextMarker* pMarker,  
   [in] long iItem  
);  

Implement this method along with GetMarkerCommandInfo to override the marker commands that the text marker itself provides to the context menu.

Applies to