IUIAutomationTextRange::FindAttribute Method

Retrieves a text range subset that has the specified text attribute value.

Syntax


HRESULT FindAttribute(          TEXTATTRIBUTEID attr,
    VARIANT val,
    BOOL backward,
    IUIAutomationTextRange **found
);

Parameters

attr
[in] The identifier of the text attribute for the text range subset being retrieved. For a list of text attribute IDs, see Text Attribute Identifiers.
val
[in] A VARIANT that contains the value of the attribute. This value must match the type specified for the attribute.
backward
[in] TRUE if the last occurring text range should be returned instead of the first; otherwise FALSE.
found
[out, retval] The address of a variable that receives a pointer to the IUIAutomationTextRange interface of the text range having a matching attribute and attribute value; otherwise NULL.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

There is no differentiation between hidden and visible text.

Community Additions

Show: