int SetBkMode(hDC,nBkMode)
This function sets the background mode used with text and line styles. The background mode defines whether or not GDI should remove existing background colors on the device surface before drawing text, hatched brushes, or any pen style that is not a solid line.
Parameter | Type/Description |
hDC | HDC Identifies the device context. | |
nBkMode | int Specifies the background mode. It can be either one of the following modes: | |
Parameter | Type/Description |
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 can be either OPAQUE or TRANSPARENT.