EM_POSFROMCHAR
An
application sends the EM_POSFROMCHAR message to retrieve the coordinates of the
specified character in an edit control.
EM_POSFROMCHAR
wParam = (LPPOINT) lpPoint; // address of structure
// receiving
character position
lParam = (LPARAM) wCharIndex; // zero-based index of character
Parameters
lpPoint
Value of wParam.
Address of a POINT structure that receives the coordinates of the
specified character. The coordinates in the structure locate the upper-left
corner of the character. If the 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. The coordinates are relative to
the upper-left corner of the edit control s client area.
wCharIndex
Value of lParam.
Specifies the zero-based index of the character.
Return Value
This message
does not return a value.
Remarks
For a
single-line edit control, the y-coordinate is always zero. A returned
coordinate can be negative if the character has been scrolled outside the edit
control s client area. The coordinates are truncated to integer values.
See Also