|
|
1.1 root 1: /*
2: * drivinit.h
3: *
4: * Header file for printer driver initialization using ExtDeviceModeEx()
5: * and DeviceCapabilitiesEx().
6: *
7: */
8:
9: /* size of a device name string */
10: #define CCHDEVICENAME 32
11:
12: /* current version of specification */
13: #define DM_SPECVERSION 0x300
14:
15: /* field selection bits */
16: #define DM_ORIENTATION 0x0000001L
17: #define DM_PAPERSIZE 0x0000002L
18: #define DM_PAPERLENGTH 0x0000004L
19: #define DM_PAPERWIDTH 0x0000008L
20: #define DM_SCALE 0x0000010L
21: #define DM_COPIES 0x0000100L
22: #define DM_DEFAULTSOURCE 0x0000200L
23: #define DM_PRINTQUALITY 0x0000400L
24: #define DM_COLOR 0x0000800L
25: #define DM_DUPLEX 0x0001000L
26:
27: /* orientation selections */
28: #define DMORIENT_PORTRAIT 1
29: #define DMORIENT_LANDSCAPE 2
30:
31: /* paper selections */
32: #define DMPAPER_FIRST DMPAPER_LETTER
33: #define DMPAPER_LETTER 1 // Letter 8 1/2 x 11 in
34: #define DMPAPER_LETTERSMALL 2 // Letter Small 8 1/2 x 11 in
35: #define DMPAPER_TABLOID 3 // Tabloid 11 x 17 in
36: #define DMPAPER_LEDGER 4 // Ledger 17 x 11 in
37: #define DMPAPER_LEGAL 5 // Legal 8 1/2 x 14 in
38: #define DMPAPER_STATEMENT 6 // Statement 5 1/2 x 8 1/2 in
39: #define DMPAPER_EXECUTIVE 7 // Executive"7 1/2 x 10 in
40: #define DMPAPER_A3 8 // A3 297 x 420 mm
41: #define DMPAPER_A4 9 // A4 210 x 297 mm
42: #define DMPAPER_A4SMALL 10 // A4 Small 210 x 297 mm
43: #define DMPAPER_A5 11 // A5 148 x 210 mm
44: #define DMPAPER_B4 12 // B4 250 x 354
45: #define DMPAPER_B5 13 // B5 182 x 257 mm
46: #define DMPAPER_FOLIO 14 // Folio 8 1/2 x 13 in
47: #define DMPAPER_QUARTO 15 // Quarto 215 x 275 mm
48: #define DMPAPER_10X14 16 // 10x14 in
49: #define DMPAPER_11X17 17 // 11x17 in
50: #define DMPAPER_NOTE 18 // Note 8 1/2 x 11 in
51: #define DMPAPER_ENV_9 19 // Envelope #9 3 7/8 x 8 7/8
52: #define DMPAPER_ENV_10 20 // Envelope #10 4 1/8 x 9 1/2
53: #define DMPAPER_ENV_11 21 // Envelope #11 4 1/2 x 10 3/8
54: #define DMPAPER_ENV_12 22 // Envelope #12 4 \276 x 11
55: #define DMPAPER_ENV_14 23 // Envelope #14 5 x 11 1/2
56: #define DMPAPER_CSHEET 24 // C size sheet
57: #define DMPAPER_DSHEET 25 // D size sheet
58: #define DMPAPER_ESHEET 26 // E size sheet
59: #define DMPAPER_ENV_DL 27 // Envelope DL 110 x 220mm
60: #define DMPAPER_ENV_C5 28 // Envelope C5 162 x 229 mm
61: #define DMPAPER_LAST DMPAPER_ENV_C5
62:
63: #define DMPAPER_USER 256
64:
65: /* bin selections */
66: #define DMBIN_FIRST DMBIN_UPPER
67: #define DMBIN_UPPER 1
68: #define DMBIN_ONLYONE 1
69: #define DMBIN_LOWER 2
70: #define DMBIN_MIDDLE 3
71: #define DMBIN_MANUAL 4
72: #define DMBIN_ENVELOPE 5
73: #define DMBIN_ENVMANUAL 6
74: #define DMBIN_AUTO 7
75: #define DMBIN_TRACTOR 8
76: #define DMBIN_SMALLFMT 9
77: #define DMBIN_LARGEFMT 10
78: #define DMBIN_LARGECAPACITY 11
79: #define DMBIN_CASSETTE 14
80: #define DMBIN_LAST DMBIN_CASSETTE
81:
82: #define DMBIN_USER 256 /* device specific bins start here */
83:
84: /* print qualities */
85: #define DMRES_DRAFT (-1)
86: #define DMRES_LOW (-2)
87: #define DMRES_MEDIUM (-3)
88: #define DMRES_HIGH (-4)
89:
90: /* color enable/disable for color printers */
91: #define DMCOLOR_MONOCHROME 1
92: #define DMCOLOR_COLOR 2
93:
94: /* duplex enable */
95: #define DMDUP_SIMPLEX 1
96: #define DMDUP_VERTICAL 2
97: #define DMDUP_HORIZONTAL 3
98:
99: #ifndef _WINGDI_
100: typedef struct _devicemode {
101: char dmDeviceName[CCHDEVICENAME];
102: WORD dmSpecVersion;
103: WORD dmDriverVersion;
104: WORD dmSize;
105: WORD dmDriverExtra;
106: DWORD dmFields;
107: short dmOrientation;
108: short dmPaperSize;
109: short dmPaperLength;
110: short dmPaperWidth;
111: short dmScale;
112: short dmCopies;
113: short dmDefaultSource;
114: short dmPrintQuality;
115: short dmColor;
116: short dmDuplex;
117: } DEVMODE;
118:
119: typedef DEVMODE * PDEVMODE, NEAR * NPDEVMODE, FAR * LPDEVMODE;
120:
121: #endif
122:
123: /* mode selections for the device mode function */
124: #define DM_UPDATE 1
125: #define DM_COPY 2
126: #define DM_PROMPT 4
127: #define DM_MODIFY 8
128:
129: #define DM_IN_BUFFER DM_MODIFY
130: #define DM_IN_PROMPT DM_PROMPT
131: #define DM_OUT_BUFFER DM_COPY
132: #define DM_OUT_DEFAULT DM_UPDATE
133:
134: /* device capabilities indices */
135: #define DC_FIELDS 1
136: #define DC_PAPERS 2
137: #define DC_PAPERSIZE 3
138: #define DC_MINEXTENT 4
139: #define DC_MAXEXTENT 5
140: #define DC_BINS 6
141: #define DC_DUPLEX 7
142: #define DC_SIZE 8
143: #define DC_EXTRA 9
144: #define DC_VERSION 10
145: #define DC_DRIVER 11
146: #define DC_BINNAMES 12
147: #define DC_ENUMRESOLUTIONS 13
148: #define DC_FILEDEPENDENCIES 14
149:
150: /* export ordinal definitions */
151: #define PROC_EXTDEVICEMODE MAKEINTRESOURCE(90)
152: #define PROC_DEVICECAPABILITIES MAKEINTRESOURCE(91)
153: #define PROC_OLDDEVICEMODE MAKEINTRESOURCE(13)
154:
155: /* define types of pointers to ExtDeviceModeEx() and DeviceCapabilitiesEx()
156: * functions
157: */
158: #ifndef _WINUSER_
159: typedef WORD HANDLE;
160: typedef WORD HWND;
161: #endif
162:
163: typedef WORD FAR PASCAL FNDEVMODE(HWND, HANDLE, LPDEVMODE, LPSTR, LPSTR,
164: LPDEVMODE, LPSTR, WORD);
165:
166: typedef FNDEVMODE FAR * LPFNDEVMODE;
167:
168: typedef DWORD FAR PASCAL FNDEVCAPS(LPSTR, LPSTR, WORD, LPSTR, LPDEVMODE);
169:
170: typedef FNDEVCAPS FAR * LPFNDEVCAPS;
171:
172: HDC FAR PASCAL ResetDC(HDC, LPDEVMODE);
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.