GETSETPAPERORIENT

Syntax

short Escape(hDC, GETSETPAPERORIENT,nCount, lpInData, NULL)

This escape returns or sets the current paper orientation. This escape is provided only for backward compatibility. An application should call the ExtDeviceMode function instead.

Parameter Type/Description  

hDC HDC Identifies the device context.  
nCount Specifies the number of bytes pointed to by the lpInData parameter.  
lpInData ORIENT FAR * Points to an ORIENT data structure that specifies the new paper orientation. See the following “Comments” section for a description of this data structure. It may be set to NULL, in which case the GETSETPAPERORIENT escape returns the current paper orientation.  

Return Value

The return value specifies the current orientation if lpInData is NULL; otherwise, it is the previous orientation. The return value is –1 if the escape failed.

Comments

This escape is provided only for backward compatibility. New applications should use the GDI DeviceCapabilities and ExtDeviceMode functions instead.

The ORIENT data structure has the following format:

typedef struct{

DWORD Orientation;

DWORD Reserved;

DWORD Reserved;

DWORD Reserved;

DWORD Reserved;

} ORIENT;

The Orientation field can be either of these values:

Value Meaning

1 The new orientation is portrait.
2 The new orientation is landscape.

This escape is also known as GETSETPAPERORIENTATION.