OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
Accessing TFont

You can access TFont through an HFONT or as a LOGFONT structure.

To get an HFONT from a TFont object, use the HFONT() operator with the TFont object as the parameter. The HFONT() operator is almost never explicitly invoked:

{
return font;
}

This code automatically invokes the HFONT() conversion operator to cast the TFont object to the correct type.

To convert a TFont object to a LOGFONT structure, use the TFont::GetObject function:

{
TFont font("Times Roman", 20, 8);
return font.GetObject(logFont);
}

See Also