int SetBkMode(hdc, iBkMode) | |||
HDC hdc; | |||
int iBkMode; |
The SetBkMode function sets the background mode used with text, line styles, and hatched brushes. The background mode defines whether or not existing background colors should be removed on the device surface before drawing text, hatched brushes, or any pen style that is not a solid line.
hdc
Identifies the device context.
iBkMode
Specifies the background mode. It can be either one of the following modes:
Value | Meaning |
OPAQUE | ||
Background is filled with the current background color before the text, hatched brush, or pen is drawn. | ||
TRANSPARENT | ||
Background remains untouched. |
The return value specifies the previous background mode. It will be 0 if an error occurred.
This function sets the line styles for lines drawn with a pen that was created using the CreatePen function; it does not affect lines drawn with a pen that was created using the ExtCreatePen function.
CreatePen, SetBkColor