DEVMODE
This structure contains information about a printer environment and device initialization.
typedef struct_devicemode {
BCHAR 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;
BCHAR dmFormName[CCHFORMNAME];
WORD dmLogPixels;
DWORD dmBitsPerPel ;
DWORD dmPelsWidth ;
DWORD dmPelsHeight ;
DWORD dmDisplayFlags ;
DWORD dmDisplayFrequency ;
} DEVMODE;
Members
dmDeviceName
Unsupported; set to zero.dmSpecVersion
Specifies the version number of the initialization data specification on which the structure is based. Must be initialized to SPEC_VERSION.dmDriverVersion
Unsupported; set to zero.dmSize
Specifies the size, in bytes, of the DEVMODE structure, not including any private driver-specific data that might follow the structures public members. Set this member to sizeof(DEVMODE) to indicate the version of the DEVMODE structure being used.dmDriverExtra
Unsupported; set to zero.dmFields
Unsupported; set to zero.dmOrientation
For printer devices only, specifies the orientation of the paper. It is either DMORIENT_PORTRAIT (1) or DMORIENT_LANDSCAPE (2).dmPaperSize
For printer devices only, specifies the size of the paper to print on. This member is one of the following predefined values.Value Description DMPAPER_LETTER Letter, 8 1/2- by 11-inches DMPAPER_A4 A4 Sheet, 210- by 297-millimeters dmPaperLength
Unsupported; set to zero.dmPaperWidth
Unsupported; set to zero.dmScale
Unsupported; set to zero.dmCopies
Unsupported; set to zero.DmDefaultSource
Unsupported; set to zero.dmPrintQuality
Specifies the printer resolution. The following are predefined device-independent values:- DMRES_DRAFT
- DMRES_HIGH
dmColor
Switches between color and monochrome on color printers. The following are possible values:- DMCOLOR_COLOR
- DMCOLOR_MONOCHROME
dmDuplex
Unsupported; set to zero.dmYResolution
Unsupported; set to zero.dmTTOption
Unsupported; set to zero.dmCollate
Unsupported; set to zero.dmFormName
Unsupported; set to zero.dmLogPixels
Unsupported; set to zero.dmBitsPerPel
Unsupported; set to zero.dmPelsWidth
Unsupported; set to zero.dmPelsHeight
Unsupported; set to zero.dmDisplayFlags
Unsupported; set to zero.dmDisplayFrequency
Unsupported; set to zero.
Remarks
A device drivers private data follows the public portion of the DEVMODE structure. The size of the public data can vary for different versions of the structure. The dmSize member specifies the number of bytes of public data, and the dmDriverExtra member specifies the number of bytes of private data.
All unsupported members should be initialized to zero.
Requirements
| Runs on | Versions | Defined in | Include | Link to |
|---|---|---|---|---|
| Windows CE OS | 2.0 and later | Wingdi.h |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
See Also
Last updated on Tuesday, July 13, 2004
© 1992-2000 Microsoft Corporation. All rights reserved.