ITextRange::Collapse method

Collapses the specified text range into a degenerate point at either the beginning or end of the range.

Syntax

HRESULT Collapse(
  long bStart
);

Parameters

bStart

Type: long

Flag specifying the end to collapse at. It can be one of the following.

Value Meaning
tomStart or tomTrue
Range is collapsed to the start of the range. This is the default.
tomEnd or tomFalse
Range is collapsed to the end of the range.

Return Value

Type: HRESULT

This method returns an HRESULT value. If successful, it returns S_OK. Otherwise, it returns S_FALSE.

Requirements

   
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header tom.h
DLL Msftedit.dll

See Also

Conceptual

ITextRange

Reference

Text Object Model