VpeSetDevOrientation

<< Click to Display Table of Contents >>

Navigation:  Device Control Properties >

VpeSetDevOrientation

Previous pageReturn to chapter overviewNext page

[Windows platform only; not supported by the Community Edition]

Sets the orientation of the currently selected output device to portrait or landscape. Setting this property does NOT affect the setting of the preview (see VpeSetPageOrientation()).

int VpeSetDevOrientation(

VpeHandle hDoc,

int orientation

)

VpeHandle hDoc

Document Handle

int orientation

possible values are:

Constant Name

Value

Comment

VORIENT_PORTRAIT

1

 

VORIENT_LANDSCAPE

2

 

Returns:

Value

Description

True

success

False

failure

Remarks:

The DevOrientation property is available for total control. It is only useful if called while processing the VPE_PRINT_NEWPAGE event. Otherwise the DevOrientation property is always overridden by the PageOrientation property. You should always use VpeSetPageOrientation() to change the orientation for the preview and the printer.

 

In case of an error, LastError is set to VERR_COMMON. An error may occur if the device does not support changing the orientation.

Example:

VpeSetDevOrientation(hDoc, VORIENT_LANDSCAPE)