IUIAutomationTextPattern2::RangeFromAnnotation method (uiautomationclient.h)
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
[in] annotation
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.
[out, retval] range
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
Requirement | Value |
---|---|
Minimum supported client | Windows 8 [desktop apps only] |
Minimum supported server | Windows Server 2012 [desktop apps only] |
Target Platform | Windows |
Header | uiautomationclient.h (include UIAutomation.h) |