Help Center

CRichEdit.GetLineCountmethod

Retrieves the number of lines in a multiline rich edit control.

Windowsmethoddocumented

Syntax

FUNCTION GetLineCount (BYVAL hRichEdit AS HWND) AS LONG

Parameters

NameDescription
hRichEditThe handle of the rich edit control.

Return value

The return value is an integer specifying the total number of text lines in the multiline edit control or rich edit control. If the control has no text, the return value is 1. The return value will never be less than 1.

Description

Retrieves the number of lines in a multiline rich edit control.

Remarks

The EM_GETLINECOUNT message retrieves the total number of text lines, not just the number of lines that are currently visible.

If the Wordwrap feature is enabled, the number of lines can change when the dimensions of the editing window change.

Reference

  • Defined in AfxNova/CRichEdit.inc:540
  • Documented in Windows/WIndows Controls/CRichEdit Class.md
  • Topic: CRichEdit Class