EM_GETLINECOUNT
wParam = 0; /* not used, must be zero */
lParam = 0L; /* not used, must be zero */
An application sends an EM_GETLINECOUNT message to retrieve the number of lines in a multiline edit control.
This message is processed only by multiline edit controls.
This message has no parameters.
The return value is an integer containing the number of lines in the multiline edit control. If no text is in the edit control, the return value is 1.
This example sends an EM_GETLINECOUNT message to retrieve the number of lines in a multiline edit control and then sends an EM_LINESCROLL message to scroll the edit control so that the last line is displayed at the top of the edit control.
int cLines;
cLines = (int) SendDlgItemMessage(hdlg, ID_MYEDITCONTROL,
EM_GETLINECOUNT, 0, 0L);
SendDlgItemMessage(hdlg, ID_MYEDITCONTROL,
EM_LINESCROLL, 0, MAKELONG(cLines - 1, 0));