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.

ITextProvider::GetVisibleRanges method

Retrieves an array of disjoint text ranges from a text-based control where each text range represents a contiguous span of visible text.

Syntax


HRESULT GetVisibleRanges(
  [out, retval] SAFEARRAY **pRetVal
);

Parameters

pRetVal [out, retval]

Type: SAFEARRAY**

Receives the address of an array of pointers to the ITextRangeProvider interfaces of the visible text ranges or an empty array. A NULL reference is never returned. 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

If the visible text consists of one contiguous span of text, the pRetVal array should contain a single text range that represents all of the visible text.

If the visible text consists of multiple, disjoint spans of text, the pRetVal array should contain one text range for each visible span, beginning with the first visible span, and ending with the last visible span. Disjoint spans of visible text can occur when the content of a text-based control is partially obscured by an overlapping window or other object, or when a text-based control with multiple pages or columns has content that is partially scrolled out of view.

ITextProvider::GetVisibleRanges should return a degenerate (empty) text range if no text is visible, if all text is scrolled out of view, or if the text-based control contains no text.

Requirements

Minimum supported client

Windows XP [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2003 [desktop apps | Windows Store apps]

Header

UIAutomationCore.h (include UIAutomation.h)

IDL

UIAutomationCore.idl

See also

Reference
ITextProvider
ITextRangeProvider
Conceptual
UI Automation Providers Overview
Best Practices for Using Safe Arrays

 

 

Show:
© 2017 Microsoft