Compartir a través de


EM_POSFROMCHAR (Windows Embedded CE 6.0)

1/6/2010

This message retrieves the coordinates of the specified character in an edit control.

Syntax

EM_POSFROMCHAR 
    wCharIndex = (WPARAM) wParam; 

Parameters

  • wCharIndex
    Specifies the zero-based index of the character.

Return Value

The return value is the position of the character (x, y). For a single-line edit control, the y-coordinate is always zero.

Remarks

On return, the x-coordinate of the character is contained in the LOWORD of the LRESULT and the y-coordinate is contained in the HIWORD of the LRESULT.

Any index beyond the last character returns –1.

A returned coordinate can be negative if the character has been scrolled outside the client area of the edit control. The coordinates are truncated to integer values.

If wCharIndex is the index of a line delimiter, the returned coordinates are of the position just past the last visible character in the line.

If wCharIndex is greater than the index of the last character in the control, the returned coordinates are of the position just past the last character of the control.

Requirements

Header windows.h
Windows Embedded CE Windows CE 1.0 and later

See Also

Reference

Edit Boxes Messages
EM_CHARFROMPOS