Home » U++ Library support » RichText,QTF,RTF... » how get font height
how get font height [message #22205] |
Wed, 24 June 2009 12:04 |
|
bonami
Messages: 186 Registered: June 2007 Location: Beijing
|
Experienced Member |
|
|
i have a RichTextCtrl, i want it to be the height of the text on it.
RichTextCtrl rt;
...
String str = "[3A^test^ Graphical introduction]";
rt = str;
typedef const unsigned short screen_size_t;
screen_size_t linkSpace = 10;
screen_size_t linkSize = Arial(20).Info().GetLineHeight();
Add(rt.LeftPos(linkSpace, GetSize().cx - 2 * linkSpace).TopPos(linkSpace, linkSize));
the above code's rt fits. but i wonder how Arial(20) is related to "[3A", whose text should be of 100 dots/12 points. manual cites "points" everywhere, while it seems to mean differently.
[Updated on: Wed, 24 June 2009 12:05] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sat May 11 16:51:23 CEST 2024
Total time taken to generate the page: 0.02896 seconds
|