Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
TextRange_FindText
Collapse the table of content
Expand the table of content

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(
  _In_  HUIATEXTRANGE hobj,
  _In_  BSTR          text,
  _In_  BOOL          backward,
  _In_  BOOL          ignoreCase,
  _Out_ HUITEXTRANGE  *pRetVal
);

Parameters

hobj [in]

Type: HUIATEXTRANGE

The text range to search.

text [in]

Type: BSTR

The string to search for.

backward [in]

Type: BOOL

TRUE to search backward; otherwise FALSE.

ignoreCase [in]

Type: BOOL

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

pRetVal [out]

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]

Header

UIAutomationCoreApi.h

Library

Uiautomationcore.lib

DLL

Uiautomationcore.dll

 

 

Community Additions

ADD
Show:
© 2015 Microsoft