EM_POSFROMCHAR |
Description
Retrieves the client area coordinates of a specified character in a rich edit control. You can send this message explicitly or use the RichEdit_PosFromChar function.
C/C++ Syntax
To send this message, call the SendMessage function as follows.
PB Syntax
Parameters
Return value
Rich Edit 1.0 and 3.0: The return value is not used.
Rich Edit 2.0: The return value contains the client area coordinates of the character. The low-order word contains the horizontal coordinate and the high-order word contains the vertical coordinate.
Remarks
A returned coordinate can be a negative value if the specified character is not displayed in the edit control's client area. The coordinates are truncated to integer values.
If the character is a line delimiter, the returned coordinates indicate a point just beyond the last visible character in the line. If the specified index is greater than the index of the last character in the control, the control returns -1.
Rich Edit 3.0 and later: For backward compatibility, Microsoft Rich Edit 3.0 supports the syntax used by Rich Edit 2.0. If Rich Edit 3.0 detects that wParam is not a valid POINTL pointer, it assumes the message was sent using the Rich Edit 2.0 syntax. In this case, it uses the return value to return the coordinates.
Supported in Rich Edit 1.0 and later.
Minimum Operating System
Windows 95, Windows NT 4.0.
|