The information in this article applies to:
SYMPTOMSCalling CFont::CreatePointFont() results in a font displayed in print preview mode that is not of the point size requested. CAUSE
The CDC class contains two member variables for its current device context,
m_hDC and m_hAttribDC. m_hDC (the output device context) is equal to
m_hAttribDC (the attribute device context) by default. However, when print
preview is active, these two variables will not be equal; at that point,
the m_hDC contains the screen's device context and m_hAttribDC contains the
printer's device context. RESOLUTION
The following sample code works around the problem by creating another CDC
object based on the m_hAttribDC member of the original CDC and uses this
new CDC to call CFont::CreatePointFont(). Sample Code
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug was corrected in Visual C++ 32- bit Edition version 4.2. Additional query words: kbVC400bug 4.00 4.10 4.20 vcfixlist420
Keywords : kbcode kbMFC kbPrinting kbVC |
Last Reviewed: July 28, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |