The GetBkColor function returns the current background color for the specified device context.
COLORREF GetBkColor(
HDC hdc // handle of device context
);
If the function succeeds, the return value is a COLORREF value for the current background color.
If the function fails, the return value is CLR_INVALID.
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Requires version 1.0 or later.
Header: Declared in wingdi.h.
Import Library: Use gdi32.lib.
Painting and Drawing Overview, Painting and Drawing Functions, GetBkMode, SetBkColor