Aligning text in CRichEditCtrl
-
-
I want the text in a CRichEditCtrl to appear as in a console, with the "latest" line at the bottom and all text bottomaligned, so that if there is just one line it'll be alone at the bottom. Is there a way of implementing this...? Sprudling :confused:
-
You can use CRichEditCtrl::SetRect(). Apply the number of lines, the font height and some math. :)
-
You can use CRichEditCtrl::SetRect(). Apply the number of lines, the font height and some math. :)
-
Thanks; how to calculate a font's height? :) And what if I've turned on wrapping (no horizontal scoll). Will that count as a new line or not? (When returned from CRichEditCtrl::GetLineCount()) Sprudling
-
The height can be calculated using CDC::GetTextExtent(). As for the wrapping, I have no clue :) You will have to try it.