Article ID: 153239 - Last Review: September 18, 2003 - Revision: 3.0 BUG: Multiple CRichEditView::PrintInsideRect's Are DistortedThis article was previously published under Q153239 On This PageSYMPTOMS When 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. CAUSE The 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. RESOLUTION Save the DC before calling PrintInsideRect(), and restore
it after returning. Refer to the "Sample Code" section of this article for
details. STATUS Microsoft 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:APPLIES TO
| Article Translations
|
Back to the top
