SET_BACKGROUND_COLOR

short Escape(hdc, SET_BACKGROUND_COLOR,nCount,lpNewColor,lpOldColor)

The SET_BACKGROUND_COLOR printer escape sets and retrieves the current background color for the device.

The background color is the color of the screen surface before an application draws anything on the device. This escape is particularly useful for color printers and film recorders.

This escape should be sent before the application draws anything on the current page.

Parameters

hdc

HDC Identifies the device context.

nCount

int Specifies the number of bytes pointed to by the lpNewColor parameter.

lpNewColor

LPDWORD Points to a 32-bit integer specifying the desired background color. This parameter can be NULL if the application is merely retrieving the current background color.

lpOldColor

LPDWORD Points to a 32-bit integer that receives the previous background color. This parameter can be NULL if the application does not use the previous background color.

Return Value

The return value is nonzero if the escape is successful. This value is zero if it is unsuccessful.

Comments

The default background color is white.

The background color is reset to the default when the device driver receives an ENDDOC or ABORTDOC escape.