6 USER32_DevModeA2W ( LPDEVMODEW pW
, const LPDEVMODEA pA
)
8 #define SIZEOF_DEVMODEA_300 124
9 #define SIZEOF_DEVMODEA_400 148
10 #define SIZEOF_DEVMODEA_500 156
11 #define SIZEOF_DEVMODEW_300 188
12 #define SIZEOF_DEVMODEW_400 212
13 #define SIZEOF_DEVMODEW_500 220
15 #define COPYS(f,len) MultiByteToWideChar ( CP_THREAD_ACP, 0, pA->f, len, pW->f, len )
16 #define COPYN(f) pW->f = pA->f
17 memset ( pW
, 0, sizeof(DEVMODEW
) );
18 COPYS(dmDeviceName
, CCHDEVICENAME
);
20 COPYN(dmDriverVersion
);
23 case SIZEOF_DEVMODEA_300
:
24 pW
->dmSize
= SIZEOF_DEVMODEW_300
;
26 case SIZEOF_DEVMODEA_400
:
27 pW
->dmSize
= SIZEOF_DEVMODEW_400
;
29 case SIZEOF_DEVMODEA_500
:
30 default: /* FIXME what to do??? */
31 pW
->dmSize
= SIZEOF_DEVMODEW_500
;
40 COPYN(dmDefaultSource
);
41 COPYN(dmPrintQuality
);
47 COPYS(dmFormName
,CCHFORMNAME
);
52 COPYN(dmDisplayFlags
); // aka dmNup
53 COPYN(dmDisplayFrequency
);
55 if ( pA
->dmSize
<= SIZEOF_DEVMODEA_300
)
56 return; // we're done with 0x300 fields
65 if ( pA
->dmSize
<= SIZEOF_DEVMODEA_400
)
66 return; // we're done with 0x400 fields
68 COPYN(dmPanningWidth
);
69 COPYN(dmPanningHeight
);
76 #undef SIZEOF_DEVMODEA_300
77 #undef SIZEOF_DEVMODEA_400
78 #undef SIZEOF_DEVMODEA_500
79 #undef SIZEOF_DEVMODEW_300
80 #undef SIZEOF_DEVMODEW_400
81 #undef SIZEOF_DEVMODEW_500