Returns the character index given a pixel x-position (xp) on the line number (ln) in the given window. The character index is the zero based index of a character on the specified line. The line does not actually have to be displayed in the window at the time this function is called. See: XposFromIch (hwnd, ln, ich).
Inputs:
Parameter |
Description |
hwnd |
The window. |
ln |
The line number that contains the text to be measured. If ln is out of range, then –1 is returned. |
xp |
The x-position, which is relative to the left edge of the whole window. If xp exceeds the width of the line, then the total number of characters on the line is returned. |
You can use the XposFromIch function to perform the reverse mapping.