EM_GETFILELINECOUNT message (CommCtrl.h)

Gets the number of lines in a multiline edit control, independently of how lines are displayed on the screen.

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, independently of how lines are displayed on the screen. If the control has no text, the return value is 1. The return value will never be less than 1.

Remarks

The EM_GETFILELINECOUNT message retrieves the total number of text lines, independently of how lines are displayed on the screen, not just the number of lines that are currently visible.

Word-wrap does not change the number of lines this message returns, as this message works independently of how lines are displayed on the screen.

Requirements

Requirement Value
Minimum supported client
Windows 10, 1809 [desktop apps only]
Minimum supported server
Windows Server 2019 [desktop apps only]
Header
CommCtrl.h

See also

Reference

EM_GETFILELINE

EM_FILELINELENGTH

Edit_GetFileLineCount