EM_GETLINECOUNT message (Winuser.h)

Gets the number of lines in a multiline edit control. You can send this message to either an edit control or a rich edit control.

Parameters

wParam

Not used; must be zero.

lParam

Not used; must be zero.

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.

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.

Rich Edit: Supported in Microsoft Rich Edit 1.0 and later. For information about the compatibility of rich edit versions with the various system versions, see About Rich Edit Controls.

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Header
Winuser.h (include Windows.h)

See also

Reference

EM_GETLINE

EM_LINELENGTH

Edit_GetLineCount