Skip to content

Latest commit

 

History

History
48 lines (33 loc) · 1.21 KB

SetBkColor.md

File metadata and controls

48 lines (33 loc) · 1.21 KB

Home

Function name : SetBkColor

Group: Painting and Drawing - Library: gdi32


The SetBkColor function sets the current background color to the specified color value, or to the nearest physical color if the device cannot represent the specified color value.


Code examples:

How to put a horizontal text scrolling on the form (a news line, marquee)
How to put a vertical text scrolling on the form (a movie cast)

Declaration:

COLORREF SetBkColor(
  HDC hdc,           // handle to DC
  COLORREF crColor   // background color value
);  

FoxPro declaration:

DECLARE INTEGER SetBkColor IN gdi32;
	INTEGER hdc,;
	LONG    crColor  

Parameters:

hdc [in] Handle to the device context.

crColor [in] Specifies the new background color.


Return value:

If the function succeeds, the return value specifies the previous background color as a COLORREF value. If the function fails, the return value is CLR_INVALID.