I would like to obtain the RECT of the viewable portion of the Rich Edit control.
I couldnt find a message constant for this.
The goal is to obtain the last visible line. There is a message constant for the first visible line, but strangely not the last visible line.
EM_GETRECT retrieves the entire control area, from the top of the text all the way scrolled to the bottom, but not the immediately visible area.
So the many purported solutions using EM_GETRECT as the first step to obtain the last visible line are bogus.
Also solutions using font Metrics to obtain the last visible line are quite inaccurate especially when you have mixed font sizes.
I couldnt find a message constant for this.
The goal is to obtain the last visible line. There is a message constant for the first visible line, but strangely not the last visible line.
EM_GETRECT retrieves the entire control area, from the top of the text all the way scrolled to the bottom, but not the immediately visible area.
So the many purported solutions using EM_GETRECT as the first step to obtain the last visible line are bogus.
Also solutions using font Metrics to obtain the last visible line are quite inaccurate especially when you have mixed font sizes.