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

ITextProvider2::GetCaretRange method

Provides a zero-length text range at the location of the caret that belongs to the text-based control.

Syntax


HRESULT GetCaretRange(
  [out]         BOOL               *isActive,
  [out, retval] ITextRangeProvider **pRetVal
);

Parameters

isActive [out]

Type: BOOL*

TRUE if the text-based control that contains the caret has keyboard focus, otherwise FALSE.

pRetVal [out, retval]

Type: ITextRangeProvider**

A text range that represents the current location of the caret that belongs to the text-based control.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

If the isActive parameter is FALSE, the caret that belongs to the text-based control might not be at the same location as the system caret.

This method retrieves a text range that a client can use to find the bounding rectangle of the caret that belongs to the text-based control, or to find the text near the caret.

Requirements

Minimum supported client

Windows 8 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 [desktop apps | Windows Store apps]

Header

UIAutomationCore.h (include UIAutomation.h)

IDL

UIAutomationCore.idl

See also

ITextProvider2

 

 

Community Additions

ADD
Show:
© 2015 Microsoft