IonicWind Software

Aurora Compiler => GUI => Topic started by: Bruce Peaslee on June 02, 2006, 05:23:47 PM

Title: Edit Control Font
Post by: Bruce Peaslee on June 02, 2006, 05:23:47 PM
I can't get the font in my edit control to switch to wingdings. Everything else (size, boldness) works.


CEdit *pEdit;

...

pEdit = GetControl(RD_txtStars);
pEdit->SetColor(GREEN,BLACK);
SetFont("Wingdings",10,600,0,RD_txtStars);
pEdit->SetText("M"); // shows as an "M", not a bomb
Title: Re: Edit Control Font
Post by: Ionic Wind Support Team on June 02, 2006, 05:37:36 PM
Probably needs a different character set....SYMBOL_CHARSET perhaps.

pEdit->SetFont("Wingdings",10,600,SYMBOL_CHARSET);
Title: Re: Edit Control Font
Post by: Bruce Peaslee on June 02, 2006, 10:31:12 PM
... at the feet of the master.ÂÃ,  ÂÃ,  ;)

Thanks.
Title: Re: Edit Control Font
Post by: Ionic Wind Support Team on June 02, 2006, 10:33:30 PM
Anytime ;)
Title: Re: Edit Control Font
Post by: LarryMc on June 03, 2006, 04:49:25 AM
Bruce,
Don't you just hate it when he makes it look so easy. ;)
Title: Re: Edit Control Font
Post by: Bruce Peaslee on June 03, 2006, 11:23:46 AM
Quote from: Larry McCaughn on June 03, 2006, 04:49:25 AM
Bruce,
Don't you just hate it when he makes it look so easy. ;)

Actually, I hate it when he gives us an answer I just don't get.ÂÃ,  ÂÃ, ;)
Title: Re: Edit Control Font
Post by: Ionic Wind Support Team on June 03, 2006, 11:54:34 AM
Fonts can have multiple character sets.  If you ask Windows for a font and specify a character set that doesn't exist it will pick a "closest matching" font.  "windings" only has a SYMBOL_CHARSET and the default used by SetFont is ANSI_CHARSET.  So in this case windows looked for the closest matching font that had the same dimensions and characteristics.

The easiest way to tell what character set a font supports is to open wordpad.  Chose the font you want and then pull down the third combo box.  Western = ANSI/UNICODE

You can also use the font selector in "editor options".  The "Script" setting is the character set.

Title: Re: Edit Control Font
Post by: Bruce Peaslee on June 03, 2006, 12:12:19 PM
I understood that answer - I was just commenting in general.   :)