This function returns the system color.
#define INCL_WINSYS /* Or use INCL_WIN, INCL_PM, */ #include <os2.h> HWND hwndDesktop; /* Desktop-window handle. */ LONG clr; /* System color-index value. */ LONG lReserved; /* Reserved value, must be 0. */ LONG lRgbColor; /* RGB value. */ lRgbColor = WinQuerySysColor(hwndDesktop, clr, lReserved);