Skip to main content

Windows Dev Center

ITextRange2::SetActiveSubrange method

Makes the specified subrange the active subrange of this range.

Syntax


HRESULT SetActiveSubrange(
  [in] long cpAnchor,
  [in] long cpActive
);

Parameters

cpAnchor [in]

Type: long

The anchor end character position of the subrange to make active.

cpActive [in]

Type: long

The active end character position of the subrange to make active.

Return value

Type: HRESULT

If the method succeeds, it returns NOERROR. Otherwise, it returns an HRESULT error code.

Remarks

The active subrange is the one affected by operations such as Shift+Arrow keys if this range is the selection.

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Tom.h

DLL

Msftedit.dll

See also

ITextRange2