This function sets one or more of the colors to be used by a control window of the type specified by ColorType. If hwnd is a valid control window handle, the colors are set as presentation parameters for that window. If hwnd is set to HWND_DESKTOP, the default colors being used by that type of control window are set.

To set the default control colors for the current thread, specify CCF_APPLICATION. Be sure to issue the call to WinSetColors from the same thread that created the control windows, otherwise the call to WinSetControlColors will have no effect. To set all the colors used by a control window at once, specify CCF_GLOBAL, which is the default.

Each item in the array should contain a valid index and value pair (CTLCOLOR). The control color index must be a valid CCI_ constant. The control color value can be one of the following: