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:
Note: Valid RGB colors include SYSCLR_ values, which are actually indexes but can be used by graphics functions in RGB mode.
If CCV_DEFAULT is used when hwnd is a valid control window, the presentation parameter that maps to the specified CCI_ index is removed.
If an RGB value that is not a pure color is specified as one of the color values, and if that color is used to draw lines with the control, the end result is not defined. Although dithered colors are okay for filled areas such as backgrounds, they cannot be used for lines.
This function can only be used for setting the colors of standard PM controls.