YposFromLine (hwnd, ln)

Returns the pixel y-position of the given line number (ln) in the given window. The y-position is relative to the top edge of the window. If the line number is not visible in the window, then -1 is returned. See: LineFromYpos (hwnd, ypos).

Inputs:

Parameter

Description

hwnd

The window.

ln

The line number that contains the text to be mea­sured. If ln is out of range in the file, or not visible in the window, then –1 is returned.

You can use the LineFromYpos function to perform the reverse mapping.