The information in this article applies to:
SYMPTOMSWhen you use CRichEditView::PrintInsideRect() more than once during printing, the text printed by calls after the first one appears either distorted or missing in Print Preview mode. CAUSEThe PrintInsideRect() scales the window extents of the DC before formatting and printing the requested text to that DC. This scaling is necessary and works for the first call. However, PrintInsideRect() does not undo the scaling before returning. Hence, the scaling will be cumulative, causing future prints to be distorted or scaled out of the visible portion of the DC. RESOLUTIONSave the DC before calling PrintInsideRect(), and restore it after returning. Refer to the "Sample Code" section of this article for details. STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available. Sample CodeHere is an example of making multiple PrintInsideRect calls per page using SaveDC() and RestoreDC() to keep the scaling from accumulating:
© Microsoft Corporation 1999, All Rights Reserved. Additional query words: MfcPrinting
Keywords : kbprint kbMFC kbVC400bug kbVC410bug kbVC420bug kbVC500bug kbVC600bug |
Last Reviewed: December 3, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |