This function sets the colors to be used by a control window. See Colors Used by PM Controls.
#define INCL_WINSYS /* Or use INCL_WIN, INCL_PM, */ #include <os2.h> HWND hwnd; /* Window handle. */ LONG clrType; /* Control color index. */ ULONG fCtlColor; /* Control Color Flags. */ ULONG cCtlColor; /* Number of items being passed in pCtlColor. */ PCTLCOLOR pCtlColor; /* Array of control colors, each comprising an index and value pair. */ LONG rc; /* Number of control colors returned in pCtlColor. */ rc = WinSetControlColors(hwnd, clrType, fCtlColor, cCtlColor, pCtlColor);