Objective Grid: Creating a CGXFont from a CFont

Article ID: 445
Last updated: 27 Apr, 2018
Article ID: 445
Last updated: 27 Apr, 2018
Revision: 3
Views: 1993
Posted: 11 Jan, 2001
by Meltreger B.
Updated: 27 Apr, 2018
by Meltreger B.

Problem

 


Can I create a CGXFont from a CFont?

 

 


Cause

 


 

 


Action

 


If you have a CFont object, let's say myFontObj, you can determine the LOGFONT structure.

LOGFONT lf;
myFontObj.GetObject(sizeof(lf), &lf);

and now use this LOGFONT to create a CGXFont

CGXFont gxfont(lf);

- or -

gxfont = lf;

This article was:   Helpful | Not helpful
Report an issue
Article ID: 445
Last updated: 27 Apr, 2018
Revision: 3
Views: 1993
Posted: 11 Jan, 2001 by Meltreger B.
Updated: 27 Apr, 2018 by Meltreger B.

Others in this category