ITextProvider::RangeFromChild method
Retrieves a text range enclosing a child element such as an image, hyperlink, or other embedded object.
Syntax
HRESULT RangeFromChild(
[in] IRawElementProviderSimple *childElement,
[out, retval] ITextRangeProvider **pRetVal
);
Parameters
- childElement [in]
-
Type: IRawElementProviderSimple*
The address of the UI Automation provider interface for the enclosed UI Automation object.
- pRetVal [out, retval]
-
Type: ITextRangeProvider**
Receives a pointer to the text range that spans the child element. This parameter is passed uninitialized.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
A provider should check that the passed element is a child of the text container.
If there is no text in the text range where the child element exists, a degenerate (empty) range is returned.
The childElement parameter is either a child of the UI Automation element associated with a TextPattern or from the array of children of an ITextRangeProvider.
Requirements
|
Minimum supported client |
Windows XP [desktop apps | Windows Store apps] |
|---|---|
|
Minimum supported server |
Windows Server 2003 [desktop apps | Windows Store apps] |
|
Header |
|
|
IDL |
|
See also
- Reference
- ITextProvider
- ITextRangeProvider
- Conceptual
- UI Automation Providers Overview