home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c045 / 2.ddi / INCLUDE / DRIVINIT.H$ / DRIVINIT.bin
Encoding:
Text File  |  1992-01-01  |  5.1 KB  |  157 lines

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