TextRange_FindText function

Note  This function is deprecated. Client applications should use the Microsoft UI Automation Component Object Model (COM) interfaces instead.
 
Returns the first text range in the specified direction that contains the text the client is searching for.

Syntax

HRESULT TextRange_FindText(
  HUIATEXTRANGE hobj,
  BSTR          text,
  BOOL          backward,
  BOOL          ignoreCase,
  HUIATEXTRANGE *pRetVal
);

Parameters

hobj

Type: HUIATEXTRANGE

The text range to search.

text

Type: BSTR

The string to search for.

backward

Type: BOOL

TRUE to search backward; otherwise FALSE.

ignoreCase

Type: BOOL

TRUE to specify a case-insensitive search; otherwise FALSE.

pRetVal

Type: HUITEXTRANGE*

When this function returns, contains the text range for the first span of text that matches the string the client is searching for. This parameter is passed uninitialized.

Return Value

Type: HRESULT

Returns S_OK if successful or an error value otherwise.

Requirements

   
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