An application sends the EM_POSFROMCHAR message to retrieve the coordinates of the specified character in an edit control.
EM_POSFROMCHAR wParam = (UINT) wCharIndex; // zero-based index of character lParam = 0; // reserved; must be zero
The return value indicates the coordinates of the upper-left corner of the specified character. The low-order word of the return value is the x-coordinate; the high-order word is the y-coordinate. The coordinates are relative to the upper-left corner of the edit control’s client area.
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.
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.
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.
file: /Techref/os/win/api/win32/mess/src/msg05_23.htm, 1KB, , updated: 2000/4/7 11:19, local time: 2024/12/10 08:56,
18.97.14.89:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://massmind.org/techref/os/win/api/win32/mess/src/msg05_23.htm"> EM_POSFROMCHAR</A> |
Did you find what you needed? |
Welcome to massmind.org! |
Welcome to massmind.org! |
.