#define GETSETPAPERMETRICS 35 |
short Control(lpDevice, GETSETPAPERMETRICS, lpNewPaper, lpOrigPaper) | |||
LPPDEVICE lpDevice; | |||
LPRECT lpNewPaper; | |||
LPRECT lpOrigPaper; |
The GETSETPAPERMETRICS escape sets the paper type according to the given paper-metrics information. It also gets the current printer's paper-metrics information. However, this escape is needed now only for backward compatibility with earlier applications. The ExtDeviceMode function achieves the same results.
This escape expects a RECT structure, representing the imageable area of the physical page, and assumes the origin is in the upper-left corner.
lpDevice
Points to a PDEVICE structure specifying the destination device.
lpNewPaper
Points to a RECT structure that contains the new imageable area. The RECT structure has the following form:
typedef struct tagRECT {
short left;
short top;
short right;
short bottom;
} RECT;
The coordinates are measured in device units. The orientation is set to match this parameter.
lpOrigPaper
Points to a RECT structure that receives the original value.
The coordinates are measured in device units.
The return value is positive if successful. Otherwise, the return value is zero if the escape is not implemented, and negative if an error occurs.