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 12:19, local time: 2024/8/24 22:11,
3.147.59.42: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://piclist.com/Techref/os/win/api/win32/mess/src/msg05_23.htm"> EM_POSFROMCHAR</A> |
Did you find what you needed? |
![]() o List host: MIT, Site host massmind.org, Top posters @none found - Page Editors: James Newton, David Cary, and YOU! * Roman Black of Black Robotics donates from sales of Linistep stepper controller kits. * Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters. * Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated! * Contributors: Richard Seriani, Sr. |
Welcome to piclist.com! |
.