VsTextViewClass::GetSelection Method (Int32, Int32, Int32, Int32)
Returns the text span corresponding to the current selection, if there is one.
Assembly: Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)
public: virtual int GetSelection( [OutAttribute] int% piAnchorLine, [OutAttribute] int% piAnchorCol, [OutAttribute] int% piEndLine, [OutAttribute] int% piEndCol )
Parameters
- piAnchorLine
-
Type:
System::Int32
[out] Anchor line position for the selection. Based on user selection, this value is not necessarily the upper line in the selection.
- piAnchorCol
-
Type:
System::Int32
[out] Anchor column position for the selection. Based on user selection, this value is not necessarily the upper, left column position in the selection. Viewcol coordinates may include virtual space.
- piEndLine
-
Type:
System::Int32
[out] End line position for the selection. Based on user selection, this value is not necessarily the lower line in the selection.
- piEndCol
-
Type:
System::Int32
[out] End column position for the selection. Based on user selection, this value is not necessarily the lower, right column position in the selection. Viewcol coordinates may include virtual space.
Return Value
Type: System::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.