Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ITextRangeProvider::FindText method

Returns a text range subset that contains the specified text.

Syntax


HRESULT FindText(
  [in]          BSTR               text,
  [in]          BOOL               backward,
  [in]          BOOL               ignoreCase,
  [out, retval] ITextRangeProvider **pRetVal
);

Parameters

text [in]

Type: BSTR

The text string to search for.

backward [in]

Type: BOOL

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

ignoreCase [in]

Type: BOOL

TRUE if case should be ignored; otherwise FALSE.

pRetVal [out, retval]

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]

Header

UIAutomationCore.h (include UIAutomation.h)

IDL

UIAutomationCore.idl

See also

Reference
ITextProvider
ITextRangeProvider
Conceptual
UI Automation Providers Overview

 

 

Show:
© 2018 Microsoft