Share via


IUIAutomationTextRange::FindText Method

Retrieves a text range subset that contains the specified text.

Syntax

HRESULT FindText(      
    BSTR text,
    BOOL backward,
    BOOL ignoreCase,
    IUIAutomationTextRange **found
);

Parameters

  • text
    [in] The text to find.
  • backward
    [in] TRUE if the last occurring text range should be returned instead of the first; otherwise FALSE.
  • ignoreCase
    [in] TRUE if case should be ignored; otherwise FALSE.
  • found
    [out, retval] The address of a variable that receives a pointer to the IUIAutomationTextRange interface for the text range, or NULL if no match is found.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

There is no differentiation between hidden and visible text.