TextRange_ExpandToEnclosingUnit function (uiautomationcoreapi.h)
Syntax
HRESULT TextRange_ExpandToEnclosingUnit(
[in] HUIATEXTRANGE hobj,
[in] TextUnit unit
);
Parameters
[in] hobj
Type: HUIATEXTRANGE
A text range object.
[in] unit
Type: TextUnit
The unit that the provider must expand the text range to.
Return value
Type: HRESULT
Returns S_OK if successful or an error value otherwise.
Remarks
If the range is already an integral number of the specified units, it remains unchanged.
If the starting endpoint is not at a TextUnit boundary, it is moved backward until it is at a boundary. Subsequently, if the ending endpoint is not at a boundary, or if it is at the same boundary as the starting endpoint, the ending endpoint is moved forward until it is at a boundary.
TextRange_ExpandToEnclosingUnit defaults up to the next supported TextUnit if the given TextUnit is not supported by the control.
Requirements
Requirement | Value |
---|---|
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 |