IUIAutomationTextPattern2::RangeFromAnnotation method

Retrieves a text range containing the text that is the target of the annotation associated with the specified annotation element.

Syntax


HRESULT RangeFromAnnotation(
  [in]           IUIAutomationElement *annotation,
  [out, retval]  IUIAutomationTextRange **range
);

Parameters

annotation [in]

Type: IUIAutomationElement*

The annotation element for which to retrieve the target text. This element is a sibling of the element that implements IUIAutomationTextPattern2 for the document.

range [out, retval]

Type: IUIAutomationTextRange**

Receives a text range that contains the target text of the annotation.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

UIAutomationClient.h (include UIAutomation.h)

IDL

UIAutomationClient.idl

See also

IUIAutomationTextPattern2
UI Automation Support for Textual Content
Working with Text-based Controls

 

 

Community Additions

ADD
Show:
© 2014 Microsoft