Help Center

CRichEdit.LineLengthmethod

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

Windowsmethoddocumented

Syntax

FUNCTION LineLength (BYVAL hRichEdit AS HWND, BYVAL index AS DWORD) AS LONG

Parameters

NameDescription
hRichEditThe handle of the rich edit control.
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/CRichEdit.inc:849
  • Documented in Windows/WIndows Controls/CRichEdit Class.md
  • Topic: CRichEdit Class