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/11/23 23:32,
3.141.198.13: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://sxlist.com/techref/os/win/api/win32/mess/src/msg05_23.htm"> EM_POSFROMCHAR</A> |
Did you find what you needed? |
Welcome to sxlist.com!sales, advertizing, & kind contributors just like you! Please don't rip/copy (here's why Copies of the site on CD are available at minimal cost. |
Welcome to sxlist.com! |
.