how can you get the current line number in a multi-line edit control?
From the docs for EM_LINEFROMCHAR, if you pass -1 as wParam, you get the line number of the line containing the caret (or the start of the selection if there is one).
EM_LINEFROMCHAR
-1
wParam