ENUMPAPERMETRICS

short Escape(hdc, ENUMPAPERMETRICS, sizeof(int),lpMode,lpOutData)

The ENUMPAPERMETRICS printer escape performs one of two functions according to the mode:

It determines the number of paper types supported and returns this value, which can then be used to allocate an array of RECT structures.

It returns one or more RECT structures that define the areas on the page that can receive an image.

This escape is provided only for backward compatibility. An application should call the DeviceCapabilities function with the DC_PAPERSIZE index to discover the number of available paper sizes and the dimensions of each size.

Parameters

hdc

HDC Identifies the device context.

lpMode

LPINT Points to an integer that specifies the mode for the escape. It can be one of the following values:

Value Meaning

0 Return value indicates how many RECT structures are required to contain the information about the available paper types.
1 Array of RECT structures to which the lpOutData parameter points is filled with the information.

lpOutData

LPRECT Points to an array of RECT structures that return all the areas capable of receiving an image.

Return Value

The return value is positive if the escape is successful. The value is zero if the escape is not implemented and negative if an error occurred.