typedef struct _devicemode { // dvmd
TCHAR dmDeviceName[CCHDEVICENAME];
WORD dmSpecVersion;
WORD dmDriverVersion;
WORD dmSize;
WORD dmDriverExtra;
DWORD dmFields;
short dmOrientation;
short dmPaperSize;
short dmPaperLength;
short dmPaperWidth;
short dmScale;
short dmCopies;
short dmDefaultSource;
short dmPrintQuality;
short dmColor;
short dmDuplex;
short dmYResolution;
short dmTTOption;
short dmCollate;
TCHAR dmFormName[CCHFORMNAME];
WORD dmUnusedPadding;
USHORT dmBitsPerPel;
DWORD dmPelsWidth;
DWORD dmPelsHeight;
DWORD dmDisplayFlags;
DWORD dmDisplayFrequency;
WORD dmICMMethod;
WORD dmICMIntent;
WORD dmMediaType;
WORD dmDitherType;
DWORD dmReserved1;
DWORD dmReserved2;
} DEVMODE;
Contains information about the device initialization and environment of a printer. An application passes this structure to the DeviceCapabilities and ExtDeviceMode functions.
Value | Meaning |
---|---|
DM_ORIENTATION (0x00000001) | Use the dmOrientation member. |
DM_PAPERSIZE (0x00000002) | Use the dmPaperSize member. If dmPaperSize is set to DMPAPER_USER, an application must also include the DM_PAPERWIDTH and DM_PAPERLENGTH flags . |
DM_PAPERLENGTH (0x00000004) | Use the dmPaperLength member. Include this flag only if dmPaperSize is set to DMPAPER_USER. |
DM_PAPERWIDTH (0x00000008) | Use the dmPaperWidth member. Include this flag only if dmPaperSize is set to DMPAPER_USER. |
DM_SCALE (0x00000010) | Use the dmScale member. |
DM_COPIES (0x00000100) | Use the dmCopies member. |
DM_DEFAULTSOURCE (0x00000200) | Use the dmDefaultSource member. |
DM_PRINTQUALITY (0x00000400) | Use the dmPrintQuality member. |
DM_COLOR (0x00000800) | Use the dmColor member. |
DM_DUPLEX (0x00001000) | Use the dmDuplex member. |
DM_YRESOLUTION (0x00002000) | Use the dmYResolution member. |
DM_TTOPTION (00004000) | Use the dmTTOption member. |
DM_COLLATE (0x00008000) | Use the dmCollate member. |
DM_FORMNAME (0x00010000) | Use the dmFormName member. |
DM_UNUSED (0x00020000) | Use the dmUnusedPadding member. |
DM_BITSPERPEL (0x00040000) | Use the dmBitsPerPel member. |
DM_PELSWIDTH (0x00080000) | Use the dmPelsWidth member. |
DM_PELSHEIGHT (0x00100000) | Use the dmPelsHeight member. |
DM_DISPLAYFLAGS (0x00200000) | Use the dmDisplayFlags member. |
DM_DISPLAYFREQUENCY (0x00400000) | Use the dmDisplayFrequency member. |
DM_ICMMETHOD (0x02000000) | Use the dmICMMethod member. |
DM_ICMINTENT (0x04000000) | Use the dmICMIntent member. |
DM_MEDIATYPE (0x08000000) | Use the dmMediaType member. |
DM_DITHERTYPE (0x10000000) | Use the dmDitherType member. |
DM_RESERVED1 (0x00800000) | Use the dmReserved1 member. |
DM_RESERVED2 (0x01000000) | Use the dmReserved2 member. |
Value | Meaning |
---|---|
DMPAPER_10X14 | 10 by 14 inch sheet |
DMPAPER_11X17 | 11 by 17 inch sheet |
DMPAPER_A3 | A3 sheet, 297 by 420 millimeters |
DMPAPER_A4 | A4 sheet, 210 by 297 millimeters |
DMPAPER_A4SMALL | A4 small sheet, 210 by 297 millimeters |
DMPAPER_A5 | A5 sheet, 148 by 210 millimeters |
DMPAPER_B4 | B4 sheet, 250 by 354 millimeters |
DMPAPER_B5 | B5 sheet, 182 by 257 millimeter paper |
DMPAPER_CSHEET | C sheet, 17 by 22 inches |
DMPAPER_DSHEET | D sheet, 22 by 34 inches |
DMPAPER_ENV_10 | #10 envelope, 4 1/8 by 9 1/2 inches |
DMPAPER_ENV_11 | #11 envelope, 4 1/2 by 10 3/8 inches |
DMPAPER_ENV_12 | #12 envelope, 4 3/4 by 11 inches |
DMPAPER_ENV_14 | #14 envelope, 5 by 11 1/2 inches |
DMPAPER_ENV_9 | #9 envelope, 3 7/8 by 8 7/8 inches |
DMPAPER_ENV_B4 | B4 envelope, 250 by 353 millimeters |
DMPAPER_ENV_B5 | B5 envelope, 176 by 250 millimeters |
DMPAPER_ENV_B6 | B6 envelope, 176 by 125 millimeters |
DMPAPER_ENV_C3 | C3 envelope, 324 by 458 millimeters |
DMPAPER_ENV_C4 | C4 envelope, 229 by 324 millimeters |
DMPAPER_ENV_C5 | C5 envelope, 162 by 229 millimeters |
DMPAPER_ENV_C6 | C6 envelope, 114 by 162 millimeters |
DMPAPER_ENV_C65 | C65 envelope, 114 by 229 millimeters |
DMPAPER_ENV_DL | DL envelope, 110 by 220 millimeters |
DMPAPER_ENV_ITALY | Italy envelope, 110 by 230 millimeters |
DMPAPER_ENV_MONARCH | Monarch envelope, 3 7/8 by 7 1/2 inches |
DMPAPER_ENV_PERSONAL | 6 3/4 envelope, 3 5/8 by 6 1/2 inches |
DMPAPER_ESHEET | E sheet, 34 by 44 inches |
DMPAPER_EXECUTIVE | Executive, 7 1/4 by 10 1/2 inches |
DMPAPER_FANFOLD_LGL_GERMAN | German legal fanfold, 8 1/2 by 13 inches |
DMPAPER_FANFOLD_STD_GERMAN | German standard fanfold, 8 1/2 by 12 inches |
DMPAPER_FANFOLD_US | U.S. standard fanfold, 14 7/8 by 11 inches |
DMPAPER_FOLIO | Folio, 8 1/2 by 13 inch paper |
DMPAPER_LEDGER | Ledger, 17 by 11 inches |
DMPAPER_LEGAL | Legal, 8 1/2 by 14 inches |
DMPAPER_LETTER | Letter, 8 1/2 by 11 inches |
DMPAPER_LETTERSMALL | Letter small, 8 1/2 by 11 inches |
DMPAPER_NOTE | Note, 8 1/2 by 11 inches |
DMPAPER_QUARTO | Quarto, 215 by 275 millimeter paper |
DMPAPER_STATEMENT | Statement, 5 1/2 by 8 1/2 inches |
DMPAPER_TABLOID | Tabloid, 11 by 17 inches |
DMPAPER_USER | Programmer-defined paper size. The dmPaperLength and dmPaperWidth members must specify the size. |
DMBIN_AUTO (7) | |
DMBIN_CASSETTE (14) | |
DMBIN_ENVELOPE (5) | |
DMBIN_ENVMANUAL (6) | |
DMBIN_LARGECAPACITY (11) | |
DMBIN_LARGEFMT (10) | |
DMBIN_LOWER (2) | |
DMBIN_MANUAL (4) | |
DMBIN_MIDDLE (3) | |
DMBIN_ONLYONE (1) | |
DMBIN_SMALLFMT (9) | |
DMBIN_TRACTOR (8) | |
DMBIN_UPPER (1) |
DMRES_HIGH (4) | |
DMRES_MEDIUM (3) | |
DMRES_LOW (2) | |
DMRES_DRAFT (1) |
If a positive value is given, it specifies the number of dots per inch (DPI) and is, therefore, device dependent.
DMCOLOR_COLOR (2) | |
DMCOLOR_MONOCHROME (1) |
DMDUP_SIMPLEX (1) | |
DMDUP_HORIZONTAL (3) | |
DMDUP_VERTICAL (2) |
Value | Meaning |
---|---|
DMTT_BITMAP (1) | Prints TrueType fonts as graphics. This value is the default action for dot-matrix printers. |
DMTT_DOWNLOAD (2) | Downloads TrueType fonts as soft fonts. This value is the default action for Hewlett-Packard printers that use Printer Control Language (PCL). |
DMTT_SUBDEV (3) | Substitutes device fonts for TrueType fonts. This value is the default action for PostScript® printers. |
DMTT_DOWNLOAD_OUTLINE (4) | Downloads TrueType fonts as outline soft fonts. |
Value | Meaning |
---|---|
DMCOLLATE_TRUE (1) | Collates when printing multiple copies. |
DMCOLLATE_FALSE (0) | Does not collate when printing multiple copies. |
Using DMCOLLATE_FALSE provides faster, more efficient output, since the data is sent to a page printer just once, no matter how many copies are required. The printer is simply told to print the page again.
Value | Meaning |
---|---|
DM_GRAYSCALE (0x00000001) | Display is a noncolor device. If this value is not specified, color is assumed. |
DM_INTERLACED (0x00000002) | Display mode is interlaced. If the value is not specified, noninterlaced is assumed. |
Value | Meaning |
---|---|
DMICMMETHOD_SYSTEM (1) | ICM is handled by Windows. |
DMICMMETHOD_NONE (2) | ICM is disabled. |
DMICMMETHOD_DRIVER (3) | ICM is handled by the device driver. |
DMICMMETHOD_DEVICE (4) | ICM is handled by the destination device. |
The printer driver must provide a user interface for setting this member. Most printer drivers support only the DCMICMMETHOD_SYSTEM or DCMICMMETHOD_NONE values. Drivers for PostScript printers support all values.
Value | Meaning |
---|---|
DMICM_SATURATE (1) | Color matching should optimize for color saturation. This is the most appropriate choice for business graphs, when dithering is not desired. |
DMICM_CONTRAST (2) | Color matching should optimize for color contrast. This is the most appropriate choice for scanned or photographic images, when dithering is desired. |
DMICM_COLORMETRIC (3) | Color matching should optimize to match the exact color requested. This is most appropriate for use with business logos or other images when an exact color match is desired. |
Value | Meaning |
---|---|
DMMEDIA_STANDARD (1) | Plain paper |
DMMEDIA_GLOSSY (2) | Glossy paper |
DMMEDIA_TRANSPARENCY (3) | Transparent film |
Value | Meaning |
---|---|
DMDITHER_NONE (1) | No dithering. |
DMDITHER_COARSE (2) | Dither with a coarse brush.*/ |
DMDITHER_FINE (3) | Dither with a fine brush.*/ |
DMDITHER_LINEART (4) | Line art dithering; a special dither method that produces well-defined borders between black, white, and gray scalings. It is not suitable for images that include continuous graduations in intensity and hue, such as scanned photographs. |
DMDITHER_GRAYSCALE (5) | Device does grayscaling. |
A device driver's private data follows immediately after the end of the structure. The number of bytes of private data is specified by the dmDriverExtra member.
ExtDeviceMode