BUG: CreateDC Does Not Thunk DEVMODE Structure Correctly
Article ID: 128701
Article Last Modified on 10/30/2003
APPLIES TO
- Microsoft Win32s 1.2
- Microsoft Win32s 1.25
This article was previously published under Q128701
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 query words: 1.20 3.10 3.50
Keywords: KB128701