Quantcast
Channel: VBForums - API
Viewing all articles
Browse latest Browse all 168

Rectangle of RichEdit control's viewable area

$
0
0
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.

Viewing all articles
Browse latest Browse all 168

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>