Compartilhar via


EM_CHARFROMPOS

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This message retrieves the zero-based character index and zero-based line index of the character nearest the specified point in an edit control.

Syntax

EM_CHARFROMPOS 
    wParam = 0; 
    lParam = MAKELPARAM(x, y);

Parameters

  • wParam
    Not used; set to 0.
  • lParam
    Specifies the coordinates of a point in the client area of the control. The coordinates are in screen units and are relative to the upper-left corner of the client area of the control. The low-order word of lParam contains the horizontal coordinate. The high-order word contains the vertical coordinate.

Return Value

The low-order word of the return value specifies the zero-based index of the character nearest the specified point. This index is relative to the beginning of the control, not the beginning of the line. If the specified point is beyond the last character in the edit control, the return value indicates the last character in the control.

The high-order word of the return value specifies the zero-based index of the line that contains the character. For single-line edit controls, this value is zero. The index indicates the line delimiter if the specified point is beyond the last visible character in a line.

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_POSFROMCHAR
Edit Boxes Messages