Edit_GetFileLineLength macro (commctrl.h)

Gets the length of the file (or logical) line of text from the specified character index (text wrap delimiters are ignored). You can use this macro or send the EM_FILELINELENGTH message explicitly.

Syntax

void Edit_GetFileLineLength(
   hwndCtl,
   characterIndex
);

Parameters

hwndCtl

A handle to the edit control.

characterIndex

The character index. If characterIndex = -1, the caret location index is used, not including the length of any selected text.

Return value

None

Remarks

The character index is the zero-based index of the character from the beginning of the edit control.

This macro and corresponding message do not recognize text wrapping (visible lines) and, instead, recognize file (logical) lines with an end-of-line delimiter. When text wrap is turned off, visible lines are equivalent to file lines.

The EM_LINEFROMCHAR, EM_LINEINDEX, EM_LINELENGTH, EM_GETLINE, and EM_GETLINECOUNT messages recognize visible line text wrapping and provide information for the line of text up to the wrapping line break. (Each subsequent line is delimited by the next text wrap break.)

Requirements

Requirement Value
Minimum supported client Windows 10, version 1809 [desktop apps only]
Minimum supported server Windows Server [desktop apps only]
Target Platform Windows
Header commctrl.h