ENUMPAPERMETRICS

Syntax

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

This 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 data structures.

It returns one or more RECT data 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 ExtDeviceMode function instead.

Parameter Type/Description  

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 The return value indicates how many RECT data structures are required to contain the information about the available paper types.
  1 The array of RECT structures to which lpOutData points is filled with the information.
lpOutData LPRECT Points to an array of RECT data structures that return all the areas that can receive an image.  

Return Value

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