TextRange_FindText function (uiautomationcoreapi.h)

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(
  [in]  HUIATEXTRANGE hobj,
  [in]  BSTR          text,
  [in]  BOOL          backward,
  [in]  BOOL          ignoreCase,
  [out] HUIATEXTRANGE *pRetVal
);

Parameters

[in] hobj

Type: HUIATEXTRANGE

The text range to search.

[in] text

Type: BSTR

The string to search for.

[in] backward

Type: BOOL

TRUE to search backward; otherwise FALSE.

[in] ignoreCase

Type: BOOL

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

[out] 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

Requirement Value
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