ITextRangeProvider::FindText method

Returns a text range subset that contains the specified text.

Syntax

HRESULT FindText(
  BSTR               text,
  BOOL               backward,
  BOOL               ignoreCase,
  ITextRangeProvider **pRetVal
);

Parameters

text

Type: BSTR

The text string to search for.

backward

Type: BOOL

TRUE if the last occurring text range should be returned instead of the first; otherwise FALSE.

ignoreCase

Type: BOOL

TRUE if case should be ignored; otherwise FALSE.

pRetVal

Type: ITextRangeProvider**

Receives a pointer to the text range matching the specified text; otherwise NULL. 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

There is no differentiation between hidden and visible text.

Requirements

   
Minimum supported client Windows XP [desktop apps | UWP apps]
Minimum supported server Windows Server 2003 [desktop apps | UWP apps]
Target Platform Windows
Header uiautomationcore.h (include UIAutomation.h)

See Also

Conceptual

ITextProvider

ITextRangeProvider

Reference

UI Automation Providers Overview