BUG: CreateDC Does Not Thunk DEVMODE Structure Correctly

Last reviewed: September 29, 1995
Article ID: Q128701
The information in this article applies to:
  • Microsoft Win32s, versions 1.2 and 1.25

SYMPTOMS

Under Win32s version 1.2 and 1.25, when a Win32-based application displays a printer setup dialog box that calls PrintDlg with the PD_PRINTSETUP flag and the printing orientation is changed from Portrait to Landscape, the DEVMODE structure obtained from the PrintDlg call to CreateDC is passed and creates a printer DC. If the printer driver is a postscript driver, anything printed using this DC is still in Portrait mode.

CAUSE

The thunking layer for CreateDC does not thunk the DEVMODE structure for the postcript driver correctly.

RESOLUTION

To work around the problem, avoid calling CreateDC with a DEVMODE structure. Instead, directly create the pinter DC by calling PrintDlg with the PD_RETURNDC flag. Then change the printing orientation from within the print dialog box.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are reasearching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


Additional reference words: 1.20 1.25 3.10 3.50
KBCategory: kbprint kbbuglist
KBSubcategory: GdiPrn


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 29, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.