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... » Zooming font of RichText to the size of StdFont
Re: Prompt with non-system dpi for text at first [message #23863 is a reply to message #23855] Fri, 27 November 2009 15:13 Go to previous messageGo to previous message
Sender Ghost is currently offline  Sender Ghost
Messages: 301
Registered: November 2008
Senior Member
I found the following solution for my problem:
 int Prompt(Callback1<const String&> WhenLink,
            const char *title, const Image& iconbmp, const char *qtf, bool okcancel,
            const char *button1, const char *button2, const char *button3,
 		   int cx,
 		   Image im1, Image im2, Image im3)
 {
+	int bcy = Ctrl::VertLayoutZoom(24);
+	int bcx = Ctrl::HorzLayoutZoom(72);
 	int fcy = Draw::GetStdFontCy();
 	PromptDlgWnd__ dlg;
 	RichTextCtrl qtfctrl;
 	Icon         icon;
 	qtfctrl.WhenLink = WhenLink;
 	icon.SetImage(iconbmp);
 	Button b1, b2, b3;
 	qtfctrl.SetQTF(String("[G1 ") + qtf, GetRichTextStdScreenZoom());
-	int bcy = Ctrl::VertLayoutZoom(24);
-	int bcx = Ctrl::HorzLayoutZoom(72);
 	if(button1)
 		bcx = max(2 * fcy + GetTextSize(button1, Draw::GetStdFont()).cx, bcx);
 	if(button2)
 		bcx = max(2 * fcy + GetTextSize(button2, Draw::GetStdFont()).cx, bcx);
 	if(button3)
 		bcx = max(2 * fcy + GetTextSize(button3, Draw::GetStdFont()).cx, bcx);

Its just reordering of control flow. So, Ctrl::Csizeinit() can be initialized before GetRichTextStdScreenZoom().
index.php?t=getfile&id=2016&private=0
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Extracting StymeManager
Next Topic: RichTextLayoutTracer example improvement
Goto Forum:
  


Current Time: Tue May 14 21:24:34 CEST 2024

Total time taken to generate the page: 0.02078 seconds