PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Nathan Durland on March 31, 2011, 06:00:35 PM

Title: Setting fonts
Post by: Nathan Durland on March 31, 2011, 06:00:35 PM
I would like to use my programs' mainform_size event to change the size of a font in a label, based on the size of the dialog box.  I understand that to do that I use FF_MakeFontEx() and FF_Control_SetFont.  My question is, do I create the font handle, set the font and destroy the handle all in the _size function, or can I create the font handle as a global and re-use it while the program runs, then destroy it with the dialog box?
Title: Re: Setting fonts
Post by: Paul Squires on March 31, 2011, 06:09:32 PM
If your font height must change as the WM_SIZE fires each time then you will need to do the creation, setting and destroy in the WM_SIZE handler.

If you create the font once as a global then the font size will always be the same height.
Title: Re: Setting fonts
Post by: Nathan Durland on March 31, 2011, 06:24:35 PM
That's what I thought.  Thanks.