Page 1 of 1

Converting CTeeFont to CFont

Posted: Mon Oct 27, 2008 9:58 pm
by 9532498
I need to find a way to convert a CTeeFont object to CFont, in order to initialize a CFontDialog and also need to do the reverse (set the font for the header to the font object returned by the CFontDialog). Can anyone point me to an example?

Thanks.

Posted: Tue Oct 28, 2008 4:42 pm
by Pep
Hello,

how about using similar code to the following :

Code: Select all

Private Sub Command1_Click()
CommonDialog1.Flags = cdlCFScreenFonts
CommonDialog1.FontName = TChart1.Header.Font.Name
CommonDialog1.ShowFont
TChart1.Header.Font.Name = CommonDialog1.FontName
End Sub