EE_LINE_FROM_CHAR

Retrieves the index of the line that contains the specified character index (the serial position). A character index is the zero-based index of the character from the beginning of the entire text. You can send this message explicitly or use the Editor_LineFromChar inline function.

EE_LINE_FROM_CHAR
wParam = (WPARAM) (int) nLogical;
lParam = (LPARAM) (UINT) nSerialIndex;

Parameters

nLogical

Specify one of the following values.

Value

Meaning

POS_VIEW

Display Coordinates

POS_LOGICAL_A

Logical Coordinates (Count double-byte characters as two)

POS_LOGICAL_W

Logical Coordinates (Count double-byte characters as one)

nSerialIndex

Specifies the character index of the character contained in the line whose number is to be retrieved. If this parameter is -1, EE_LINE_FROM_CHAR retrieves the line number of the current line (the line containing the cursor).

Return Values

The return value is the zero-based line number of the line containing the character index specified by nSerialIndex.