Specifies the "friendly" name of the printer, the name of the printer that is displayed in the Printer list of Windows; for example, "PCL/HP LaserJet" in the case of a PCL/HP LaserJet®. This string is unique among device drivers. Note that this name may be truncated to fit in the dmDeviceName array.
Specifies the version number of the initialization data specification on which the structure is based. To ensure the correct version is used for any operating system, use DM_SPECVERSION.
Specifies the printer driver version number assigned by the printer driver developer.
Specifies the size, in bytes, of the DEVMODE structure, not including any private driver-specific data that might follow the structure's public members. Set this member to sizeof(DEVMODE) to indicate the version of the DEVMODE structure being used.
Contains the number of bytes of private driver-data that follow this structure. If a device driver does not use device-specific information, set this member to zero.
Specifies whether certain members of the DEVMODE structure have been initialized. If a member is initialized, it’s corresponding bit is set, otherwise the bit is clear. A printer driver supports only those DEVMODE members that are appropriate for the printer technology.
The following values are defined, and are listed here with the corresponding structure members.
Value |
Structure member |
DM_ORIENTATION |
dmOrientation |
DM_PAPERSIZE |
dmPaperSize |
DM_PAPERLENGTH |
dmPaperLength |
DM_PAPERWIDTH |
dmPaperWidth |
DM_POSITION |
dmPosition |
DM_SCALE |
dmScale |
DM_COPIES |
dmCopies |
DM_DEFAULTSOURCE |
dmDefaultSource |
DM_PRINTQUALITY |
dmPrintQuality |
DM_COLOR |
dmColor |
DM_DUPLEX |
dmDuplex |
DM_YRESOLUTION |
dmYResolution |
DM_TTOPTION |
dmTTOption |
DM_COLLATE |
dmCollate |
DM_FORMNAME |
dmFormName |
DM_LOGPIXELS |
dmLogPixels |
DM_BITSPERPEL |
dmBitsPerPel |
DM_PELSWIDTH |
dmPelsWidth |
DM_PELSHEIGHT |
dmPelsHeight |
DM_DISPLAYFLAGS |
dmDisplayFlags |
DM_NUP |
dmNup |
DM_DISPLAYFREQUENCY |
dmDisplayFrequency |
DM_ICMMETHOD |
dmICMMethod |
DM_ICMINTENT |
dmICMIntent |
DM_MEDIATYPE |
dmMediaType |
DM_DITHERTYPE |
dmDitherType |
DM_PANNINGWIDTH |
Windows 2000 or later: dmPanningWidth |
DM_PANNINGHEIGHT |
Windows 2000 or later: dmPanningHeight |
For printer devices only, selects the orientation of the paper. This member can be either DMORIENT_PORTRAIT (1) or DMORIENT_LANDSCAPE (2).
For printer devices only, selects the size of the paper to print on. This member can be set to zero if the length and width of the paper are both set by the dmPaperLength and dmPaperWidth members. Otherwise, the dmPaperSize member can be set to one of the following predefined values.
For printer devices only, this overrides the length of the paper specified by the dmPaperSize member, either for custom paper sizes or for devices such as dot-matrix printers that can print on a page of arbitrary length. These values, along with all other values in this structure that specify a physical length, are in tenths of a millimeter.
For printer devices only, this overrides the width of the paper specified by the dmPaperSize member.
Windows 2000/XP or later: For display devices only, a POINTL structure that indicates the positional coordinates of the display device in reference to the desktop area. The primary display device is always located at coordinates (0,0).
Specifies the factor by which the printed output is to be scaled. The apparent page size is scaled from the physical page size by a factor of dmScale/100. For example, a letter-sized page with a dmScale value of 50 will contain as much data as a 17 by 22 inch page, because the output text and graphics would be half their original height and width.
Selects the number of copies printed if the device supports multiple-page copies.
Specifies the paper source. To retrieve a list of the available paper sources for a printer, use the DeviceCapabilities function with the DC_BINS flag.
This member can be one of the following values, or it can be a device-specific value greater than or equal to DMBIN_USER.
DMBIN_ONLYONE
DMBIN_LOWER
DMBIN_MIDDLE
DMBIN_MANUAL
DMBIN_ENVELOPE
DMBIN_ENVMANUAL
DMBIN_AUTO
DMBIN_TRACTOR
DMBIN_SMALLFMT
DMBIN_LARGEFMT
DMBIN_LARGECAPACITY
DMBIN_CASSETTE
DMBIN_FORMSOURCE
Specifies the printer resolution. There are four predefined device-independent values:
DMRES_HIGH
DMRES_MEDIUM
DMRES_LOW
DMRES_DRAFT
If a positive value is specified, it specifies the number of dots per inch (DPI) and is therefore device dependent.
Switches between color and monochrome on color printers. The following values are possible:
DMCOLOR_COLOR
DMCOLOR_MONOCHROME
Selects duplex or double-sided printing for printers capable of duplex printing. The following values are possible:
Value |
Meaning |
DMDUP_SIMPLEX |
Normal (non-duplex) printing. |
DMDUP_HORIZONTAL |
Short-edge binding, that is, the long edge of the page is horizontal. |
DMDUP_VERTICAL |
Long-edge binding, that is, the long edge of the page is vertical. |
Specifies the y-resolution, in dots per inch, of the printer. If the printer initializes this member, the dmPrintQuality member specifies the x-resolution, in dots per inch of the printer.
Specifies how TrueType® fonts should be printed. This member can be one of the following values.
Value |
Meaning |
DMTT_BITMAP |
Prints TrueType fonts as graphics. This is the default action for dot-matrix printers. |
DMTT_DOWNLOAD |
Downloads TrueType fonts as soft fonts. This is the default action for Hewlett-Packard printers that use Printer Control Language (PCL). |
DMTT_DOWNLOAD_OUTLINE |
Window 11/10/8/7: Downloads TrueType fonts as outline soft fonts. |
DMTT_SUBDEV |
Substitutes device fonts for TrueType fonts. This is the default action for PostScript® printers. |
Used to align the structure to a DWORD boundary. This should not be used or referenced. It’s name and usage is reserved and can change in future releases.
Specifies whether collation should be used when printing multiple copies. (This member is ignored unless the printer driver indicates support for collation by setting the dmFields member to DM_COLLATE.) This member can be one of the following values.
Value |
Meaning |
DMCOLLATE_TRUE |
Collate when printing multiple copies. |
DMCOLLATE_FALSE |
Do not collate when printing multiple copies. |
Using DMCOLLATE_TRUE provides faster, more efficient output for collation, since the data is sent to the device driver just once, no matter how many copies are required. The printer is told to simply print the page again.
Windows 11/10/8/7 or later: Specifies the name of the form to use; for example, "Letter" or "Legal". A complete set of names can be retrieved by using the EnumForms function.
Windows 95: Printer drivers do not use this member.
Specifies the number of pixels per logical inch. Printer drivers do not use this member.
Specifies the color resolution, in bits per pixel, of the display device (for example: 4 bits for 16 colors, 8 bits for 256 colors, or 16 bits for 65,536 colors). For example, display drivers use this member in the ChangeDisplaySettings function. Printer drivers do not use this member.
Specifies the width, in pixels, of the visible device surface. For example, display drivers use this member in the ChangeDisplaySettings function. Printer drivers do not use this member.
Specifies the height, in pixels, of the visible device surface. For example, display drivers use this member in the ChangeDisplaySettings function. Printer drivers do not use this member.
Specifies the device's display mode. This member can be a combination of the following values.
Value |
Meaning |
DM_GRAYSCALE |
Specifies that the display is a non-color device. If this flag is not set, color is assumed. |
DM_INTERLACED |
Specifies that the display mode is interlaced. If the flag is not set, non-interlaced is assumed. |
For example, display drivers use this member in the ChangeDisplaySettings function. Printer drivers do not use this member.
Specifies where the NUP is done. It can be one of the following.
Value |
Meaning |
DMNUP_SYSTEM |
The print spooler does the NUP. |
DMNUP_ONEUP |
The application does the NUP. |
Specifies the frequency, in hertz (cycles per second), of the display device in a particular mode. This value is also known as the display device's vertical refresh rate. Display drivers use this member. For example, it is used in the ChangeDisplaySettings function. Printer drivers do not use this member.
When you call the EnumDisplaySettings function, the dmDisplayFrequency member may return with a value of 0 or 1. These values represent the display hardware's default refresh rate. This default rate is typically set by switches on a display card or computer motherboard or by a configuration program that does not use Win32 display functions such as ChangeDisplaySettings.
Windows 11/10/8/7 or later:
Specifies how ICM is handled. For a non-ICM application, this member determines if ICM is enabled or disabled. For ICM applications, the system examines this member to determine how to handle ICM support. This member can be one of the following predefined values, or a driver-defined value greater than or equal to the value of DMICMMETHOD_USER.
Value |
Meaning |
DMICMMETHOD_NONE |
Specifies that ICM is disabled. |
DMICMMETHOD_SYSTEM |
Specifies that ICM is handled by Windows. |
DMICMMETHOD_DRIVER |
Specifies that ICM is handled by the device driver. |
DMICMMETHOD_DEVICE |
Specifies that 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 DMICMMETHOD_SYSTEM or DMICMMETHOD_NONE value. Drivers for PostScript printers support all values.
Windows 11/10/8/7 or later:
Specifies which color matching method or intent should be used by default. This member is primarily for non-ICM applications. ICM applications can establish intents by using the ICM functions. This member can be one of the following predefined values or a driver defined value greater than or equal to the value of DMICM_USER.
Value |
Meaning |
DMICM_ABS_COLORIMETRIC |
Color matching should optimize to match the exact color requested without white point mapping. This value is most appropriate for use with proofing. |
DMICM_COLORMETRIC |
Color matching should optimize to match the exact color requested. This value is most appropriate for use with business logos or other images when an exact color match is desired. |
DMICM_CONTRAST |
Color matching should optimize for color contrast. This value is the most appropriate choice for scanned or photographic images when dithering is desired. |
DMICM_SATURATE |
Color matching should optimize for color saturation. This value is the most appropriate choice for business graphs when dithering is not desired. |
Windows 11/10/8/7 or later:
Specifies the type of media being printed on. The member can be one of the following predefined values or a driver-defined value greater than or equal to the value of DMMEDIA_USER.
Value |
Meaning |
DMMEDIA_STANDARD |
Plain paper. |
DMMEDIA_GLOSSY |
Glossy paper. |
DMMEDIA_TRANSPARENCY |
Transparent film. |
Whistler:
To retrieve a list of the available media types for a printer, use the DeviceCapabilities function with the DC_MEDIATYPES flag.
Windows 11/10/8/7 or later:
Specifies how dithering is to be done. The member can be one of the following predefined values, or a driver-defined value greater than or equal to the value of DMDITHER_USER.
Value |
Meaning |
DMDITHER_NONE |
No dithering. |
DMDITHER_COARSE |
Dithering with a coarse brush. |
DMDITHER_FINE |
Dithering with a fine brush. |
DMDITHER_LINEART |
Line art dithering, a special dithering method that produces well defined borders between black, white, and gray scaling. It is not suitable for images that include continuous graduations in intensity and hue, such as scanned photographs. |
DMDITHER_ERRORDIFFUSION |
Windows 11/10/8/7: Dithering in which an algorithm is used to spread, or diffuse, the error of approximating a specified color over adjacent pixels. In contrast, DMDITHER_COARSE, DMDITHER_FINE, and DMDITHER_LINEART use patterned half toning to approximate a color.. |
DMDITHER_GRAYSCALE |
Device does gray scaling. |
dmReserved1
Windows 11/10/8/7 or later: Not used; must be zero.
dmReserved2
Windows 11/10/8/7 or later: Not used; must be zero.