Setting fonts

Started by Nathan Durland, March 31, 2011, 06:00:35 PM

Previous topic - Next topic

Nathan Durland

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?

Paul Squires

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.
Paul Squires
PlanetSquires Software

Nathan Durland

That's what I thought.  Thanks.