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   |
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().
|
|
|
 |
|
Zooming font of RichText to the size of StdFont
By: Novo on Sat, 03 January 2009 06:45
|
 |
|
Re: Zooming font of RichText to the size of StdFont
By: mirek on Sun, 04 January 2009 15:07
|
 |
|
Re: Zooming font of RichText to the size of StdFont
By: Novo on Wed, 07 January 2009 05:20
|
 |
|
Re: Zooming font of RichText to the size of StdFont
By: mirek on Wed, 07 January 2009 13:29
|
 |
|
Re: Zooming font of RichText to the size of StdFont
By: Zeth on Sun, 08 February 2009 11:46
|
 |
|
Re: Zooming font of RichText to the size of StdFont
By: mirek on Mon, 09 February 2009 08:03
|
 |
|
Re: Zooming font of RichText to the size of StdFont
By: Zeth on Mon, 09 February 2009 09:39
|
 |
|
Re: Zooming font of RichText to the size of StdFont
By: mirek on Fri, 13 February 2009 15:11
|
 |
|
Prompt with non-system dpi for text at first
|
 |
|
Re: Prompt with non-system dpi for text at first
|
 |
|
Re: Prompt with non-system dpi for text at first
By: mirek on Sun, 29 November 2009 23:31
|
 |
|
Re: Prompt with non-system dpi for text at first
|
 |
|
Re: Prompt with non-system dpi for text at first
By: mirek on Thu, 10 December 2009 19:16
|
Goto Forum:
Current Time: Mon Apr 28 06:01:17 CEST 2025
Total time taken to generate the page: 0.00995 seconds
|