Help Center

CRichEditCtx.LineLengthmethod

Retrieves the length, in characters, of a line in a rich edit control.

Windowsmethoddocumented

Syntax

FUNCTION LineLength (BYVAL index AS DWORD) AS LONG

Parameters

NameDescription
indexThe character index of a character in the line whose length is to be retrieved. If this parameter is greater than the number of characters in the control, the return value is zero.
This parameter can be -1. In this case, the message returns the number of unselected characters on lines containing selected characters. For example, if the selection extended from the fourth character of one line through the eighth character from the end of the next line, the return value would be 10 (three characters on the first line and seven on the next).

Return value

If index is greater than the number of characters in the control, the return value is zero.

Description

Retrieves the length, in characters, of a line in a rich edit control.

Reference

  • Defined in AfxNova/CRichEditCtx.inc:2817
  • Documented in Windows/WIndows Controls/RichEdit/CRichEditCtx Class.md
  • Topic: CRichEditCtx Class