Compartilhar via


EM_LINELENGTH

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This message retrieves the length of a line, in characters, in an edit control.

Syntax

EM_LINELENGTH 
    wParam = (WPARAM) ich; 
    lParam = 0;

Parameters

  • ich
    Specifies the character index of a character in the line whose length is to be retrieved when EM_LINELENGTH is sent to a multiline edit control. If this parameter is –1, the message returns the number of unselected characters on lines containing selected characters. For example, if the selection extended from the fourth character of one line through the eighth character from the end of the next line, the return value would be 10 to include three characters on the first line and seven on the next.
  • lParam
    Not used; set to 0.

Return Value

The return value is the length, in characters, of the line specified by the ich parameter when an EM_LINELENGTH message is sent to a multiline edit control. The return value is the length, in characters, of the text in the edit control when an EM_LINELENGTH message is sent to a single-line edit control.

Remarks

Use the EM_LINEINDEX message to retrieve a character index for a specified line number within a multiline edit control.

Requirements

Header windows.h
Windows Embedded CE Windows CE 1.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

EM_LINEINDEX
Edit Boxes Messages