VsTextViewClass.GetCaretPos(Int32, Int32) Method

Definition

Returns the line and column index of the cursor position.

public:
 virtual int GetCaretPos([Runtime::InteropServices::Out] int % piLine, [Runtime::InteropServices::Out] int % piColumn) = Microsoft::VisualStudio::TextManager::Interop::IVsTextView::GetCaretPos;
public:
 virtual int GetCaretPos([Runtime::InteropServices::Out] int % piLine, [Runtime::InteropServices::Out] int % piColumn);
 virtual int GetCaretPos([Runtime::InteropServices::Out] int & piLine, [Runtime::InteropServices::Out] int & piColumn);
public virtual int GetCaretPos (out int piLine, out int piColumn);
abstract member GetCaretPos : int * int -> int
override this.GetCaretPos : int * int -> int
Public Overridable Function GetCaretPos (ByRef piLine As Integer, ByRef piColumn As Integer) As Integer

Parameters

piLine
Int32

[out] Pointer to an integer containing the line, if the method succeeds.

piColumn
Int32

[out] Pointer to an integer containing the column, if the method succeeds. Viewcol coordinates may include virtual space.

Returns

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

Implements

Applies to