SET_BACKGROUND_COLOR

  #define SET_BACKGROUND_COLOR 4103    

  short Control(lpDevice, SET_BACKGROUND_COLOR, lpNewColor, lpOldColor)    
  LPPDEVICE lpDevice;    
  LPLONG lpNewColor;    
  LPLONG lpOldColor;    

The SET_BACKGROUND_COLOR escape enables an application to set and retrieve the current background color for the device. The background color is the color of the display 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

lpDevice

Points to a PDEVICE structure specifying the destination device.

lpNewColor

Points to a 32-bit variable specifying the desired background color. This parameter can be NULL if the application merely wants to retrieve the cur-rent background color.

lpOldColor

Points to a 32-bit variable that receives the previous background color. This parameter can be NULL if the application wants to ignore the previous background color.

Return Value

The return value is TRUE if the escape is successful. Otherwise, it is FALSE.

Comments

The default background color is white.

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

See Also

ABORTDOC, ENDDOC