short Escape(hdc, ENABLEDUPLEX, sizeof(WORD),lpInData, NULL)
The ENABLEDUPLEX printer escape is maintained for backwards compatibility. Applications written for Windows 3.1 should use the ExtDeviceMode function. An application can determine whether an output device is capable of creating duplex output by checking the DM_DUPLEX bit of the dmFields member in the DEVMODE structure.
This escape enables the duplex printing capabilities of a printer. A device that possesses duplex printing capabilities is able to print on both sides of the output medium.
hdc
HDC Identifies the device context.
lpInData
LPWORD Points to an unsigned 16-bit integer that specifies whether duplex or simplex printing is used. It can be one of the following values:
Value | Meaning |
0 | Simplex |
1 | Duplex with vertical binding |
2 | Duplex with horizontal binding |
The return value specifies the outcome of the escape. This value is 1 if the escape is successful. Otherwise, it is zero.
An application should use the QUERYESCSUPPORT escape to determine whether an output device is capable of creating duplex output. If QUERYESCSUPPORT returns a nonzero value, the application should send the ENABLEDUPLEX escape even if simplex printing is desired. This procedure guarantees replacement of any values set in the driver-specific dialog box. If duplex printing is enabled and an uneven number of NEXTFRAME escapes are sent to the driver prior to the ENDDOC escape, the driver ejects an additional page before ending the print job.