short Escape(hdc, GETSETPRINTORIENT,nCount,lpInData, NULL)
The GETSETPRINTORIENT printer escape returns or sets the current paper orientation. This escape is obsolete. Printer drivers written for Windows version 3.0 and later may not support this escape. An application should call the ExtDeviceMode function instead.
hdc
HDC Identifies the device context.
nCount
short Specifies the number of bytes pointed to by the lpInData parameter.
lpInData
ORIENT FAR * Points to an ORIENT structure that specifies the new paper orientation. For a description of this structure, see the following Comments section. It may be set to NULL, in which case the GETSETPRINTORIENT escape returns the current paper orientation.
The return value specifies the current orientation if lpInData is NULL. Otherwise, this value is the previous orientation. This value is –1 if the escape fails.
This escape is provided only for backward compatibility. New applications should use the graphics device interface (GDI) DeviceCapabilities and ExtDeviceMode functions instead.
The ORIENT structure has the following form:
struct ORIENT {
DWORD Orientation;
DWORD Reserved;
DWORD Reserved;
DWORD Reserved;
DWORD Reserved;
};
The Orientation member can be one of these values:
Value | Meaning |
1 | New orientation is portrait. |
2 | New orientation is landscape. |