IVsTextView.ClearSelection(Int32) Method

Definition

Clears the current selection.

C++/CX
public:
 int ClearSelection(int fMoveToAnchor);

Parameters

fMoveToAnchor
Int32

[in] If true, the cursor is placed at the anchor after the current selection is cleared. If false, then the cursor is not moved.

Returns

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

Remarks

COM Signature

From textmgr.idl:

cpp#
HRESULT IVsTextView::ClearSelection(  
   [in] BOOL fMoveToAnchor  
);  

The anchor position is the first location that the user selected with the mouse.

Applies to

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