EM_GETFILELINE message (CommCtrl.h)

Copies a line of text from an edit control, independently of how lines are displayed on the screen, and places it in a specified buffer.

Parameters

wParam

The zero-based index of the line to retrieve from a multiline edit control. A value of zero specifies the topmost line. This parameter is ignored by a single-line edit control.

lParam

A pointer to the buffer that receives a copy of the line. Before sending the message, set the first word of this buffer to the size, in TCHARs, of the buffer. For ANSI text, this is the number of bytes; for Unicode text, this is the number of characters. The size in the first word is overwritten by the copied line.

Return value

The return value is the number of TCHARs copied. The return value is zero if the line number specified by the wParam parameter is greater than the number of lines in the edit control.

Remarks

The copied line does not contain a terminating null character.

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_FILELINELENGTH

Edit_GetFileLine

Other Resources

WM_GETTEXT