CGXGridCore::LoadFont
virtual CFont* CGXGridCore::LoadFont(CDC* pDC, const CGXStyle& style, const CGXStyle* pStandardStyle);?
pDC
Points to the device context.
style
Reference to the style-object with font-information.
pStandardStyle
Points to the standard-style.
Return Value
A pointer to the CFont previously selected into the device context. NULL if the font specified in style did not differ from the standard font.
Remarks
Advanced overridable which is called in GridMFC to efficiently load a font into the device context.
The default implementation compares the font-information given in style (CGXStyle::GetFont) with the font information of the standard-style. If the font information does not differ, LoadFont returns NULL. If it differs, LoadFont loads the font specified in style into the device context and returns a pointer to the CFont previously selected into the device context.
You can override this method if you want change the way fonts are created. For example, you could create “Courier”-fonts when the grid is in printing-mode and otherwise create the exact font by calling the base-class version of the method.
See Also
CGXGridCore::LookupOrCreateFont