Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » RichText,QTF,RTF... » how get font height
icon5.gif  how get font height [message #22205] Wed, 24 June 2009 12:04 Go to previous message
bonami is currently offline  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

 
Read Message icon5.gif
Read Message
Read Message
Read Message
Read Message
Read Message icon14.gif
Previous Topic: Inserting text into the current cursor position
Next Topic: Font alignment issues
Goto Forum:
  


Current Time: Thu Apr 18 15:06:23 CEST 2024

Total time taken to generate the page: 0.01712 seconds