ITextRange::SetPoint method (tom.h)
Changes the range based on a specified point at or up through (depending on Extend) the point (x, y) aligned according to Type.
HRESULT SetPoint( [in] long x, [in] long y, [in] long Type, [in] long Extend );
Horizontal coordinate of the specified point, in absolute screen coordinates.
Vertical coordinate of the specified point, in absolute screen coordinates.
The end to move to the specified point. It can be one of the following.
|tomStart||Move the start of range.|
|tomEnd||Move the end of range.|
How to set the endpoints of the range. If Extend is zero (the default), the range is an insertion point at the specified point (or at the nearest point with selectable text). If Extend is 1, the end specified by Type is moved to the point and the other end is left alone.
The method returns S_OK.
An application can use the specified point in the WindowFromPoint function to get the handle of the window, which usually can be used to find the client-rectangle coordinates (although a notable exception is with Windowless Controls).
|Minimum supported client||Windows Vista [desktop apps only]|
|Minimum supported server||Windows Server 2003 [desktop apps only]|