TextPattern_RangeFromPoint function

Note  This function is deprecated. Client applications should use the Microsoft UI Automation Component Object Model (COM) interfaces instead.
 
Retrieves the degenerate (empty) text range nearest to the specified screen coordinates.

Syntax

HRESULT TextPattern_RangeFromPoint(
  HUIAPATTERNOBJECT hobj,
  UiaPoint          point,
  HUIATEXTRANGE     *pRetVal
);

Parameters

hobj

Type: HUIAPATTERNOBJECT

A control pattern object.

point

Type: HiaPoint

A UiaPoint structure that contains the location in screen coordinates.

pRetVal

Type: HUIATEXTRANGE*

When this function returns, contains the text range that the node spans. This parameter is passed uninitialized.

Return Value

Type: HRESULT

Returns S_OK if successful or an error value otherwise.

Remarks

A text range that wraps a child object is returned if the screen coordinates are within the coordinates of an image, hyperlink, Microsoft Excel spreadsheet, or other embedded object.

Because hidden text is not ignored, this method retrieves a degenerate range from the visible text closest to the specified coordinates.

Requirements

   
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header uiautomationcoreapi.h
Library Uiautomationcore.lib
DLL Uiautomationcore.dll