This message returns the length of a line (in characters) in the edit control's text buffer.
wParam
Specifies the character index of a character in the specified line, where the line number of the first line is zero. If the wParam parameter is -1, the length of the current line (the line that contains the caret) is returned, not including the length of any selected text. If the current selection spans more than one line, the total length of the lines, minus the length of the selected text, is returned.
lParam
This parameter is not used.
Use the EM_LINEINDEX message to retrieve a character index for a given line number. This index can be used with the EM_LINELENGTH message.
EM_LINEINDEX