TextRange_FindAttribute Function

Note  This function is deprecated. Client applications should use the Microsoft UI Automation COM interfaces instead.

Searches in a specified direction for the first piece of text supporting a specified text attribute.

Syntax

HRESULT TextRange_FindAttribute(      
    HUIATEXTRANGE hobj,
    TEXTATTRIBUTEID attributeId,
    VARIANT val,
    BOOL backward,
    HUITEXTRANGE *pRetVal
);

Parameters

  • hobj
    [in] The text range to search.
  • attributeId
    [in] The text attribute to search for. For a list of text attribute IDs, see Text Attribute Identifiers.
  • val
    [in] The value of the attribute that the client wants to find.
  • backward
    [in] TRUE to search backward, otherwise FALSE.
  • pRetVal
    [out] When this function returns, contains the first matching text range. This parameter is passed uninitialized.

Return Value

Returns S_OK if successful or an error value otherwise.

Function Information

Stock Implementation uiautomationcore.dll
Custom Implementation No
Header uiautomationcoreapi.h
Import library uiautomationcore.lib
Minimum operating systems Windows XP