IUIAutomationTextRange::GetEnclosingElement Method

Returns the innermost UI Automation element that encloses the text range.

Syntax


HRESULT GetEnclosingElement(          IUIAutomationElement **enclosingElement
);

Parameters

enclosingElement
[out, retval] The address of a variable that receives a pointer to the IUIAutomationElement interface of the closing element, which is typically the text provider that supplies the text range. However, if the text provider supports child elements such as tables or hyperlinks, the enclosing element could be a descendant of the text provider.

Return Value

Returns S_OK if successful, or an error value otherwise.

Community Additions

Show: