I have a multi-line textbox that typically displays very long strings (license agreements, for example), and a requirement around the display is that if the user "pages" through the text via the vertical scrollbar (not clicking the arrows or the scroll box, but clicking above or below the scrollbox), on the last "page" the first line must be the last line from the previous page, and the text is padded with blanks lines to accommodate this.
I know I can get the size of the string, and the number of lines in the textbox, but is it possible to retrieve the number of lines displayed in the textbox at one time so I can calculate how much the text will need to be padded? Looking at the list of messages I can send via P/Invoke, I don't see one to request the number of displayed lines.