Converting CTeeFont to CFont

TeeChart for ActiveX, COM and ASP
Post Reply
nbp
Newbie
Newbie
Posts: 83
Joined: Mon Sep 18, 2006 12:00 am

Converting CTeeFont to CFont

Post by nbp » Mon Oct 27, 2008 9:58 pm

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.

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Tue Oct 28, 2008 4:42 pm

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

Post Reply