ITextProvider::RangeFromPoint Method
Returns the degenerate (empty) text range nearest to the specified screen coordinates.
Syntax
HRESULT RangeFromPoint( UiaPoint point, ITextRangeProvider **pRetVal );
Parameters
- point
[in] A POINT structure that specifies the location in screen coordinates.- pRetVal
[out, retval] The address of a variable that receives a pointer to the ITextRangeProvider interface of a degenerate (empty) range nearest the specified location. This parameter is passed uninitialized.
Return Value
Returns S_OK if successful, or an error value otherwise.
Remarks
A text range that encloses a child object is returned if the screen coordinates are within the coordinates of an image, hyperlink, or other embedded object.
Because hidden text is not ignored by ITextProvider::RangeFromPoint, a degenerate range from the visible text closest to the given point is returned.
The property never returns NULL (Nothing in Microsoft Visual Basic .NET).
See Also