Microsoft KB Archive/129595

{|
 * width="100%"|

INFO: Must Send WM_SYSCOLORCHANGE to Common Controls

 * }

Q129595

-

The information in this article applies to:


 * Microsoft Win32 Software Development Kit (SDK)

-

SUMMARY
You must ensure that applications that use the Windows common controls forward the WM_SYSCOLORCHANGE message to the controls.

MORE INFORMATION
Windows 95 or later and Windows NT version 4.0 or later make it very easy for the user to change the colors of common user interface objects, therefore it is critical that applications not rely on particular colors being constant. When the user changes the color settings, Windows sends a WM_SYSCOLORCHANGE message to all top-level windows. Because this message is sent only to top level windows, the common controls will not be notified of the color change unless the application forwards the WM_SYSCOLORCHANGE message to the control.

An example of why this is important is the toolbar control. If the color settings are such that the "3D Objects" color is set to light gray, the toolbar will create its buttons to light gray. However if the WM_SYSCOLORCHANGE message is not forwarded to the toolbar and the 3D Object color is changed to blue, the toolbar buttons will remain light gray while all the other buttons in the system change to blue.

Additional query words:

Keywords : kbCtrl kbOSWinNT kbOSWin2000 kbSDKWin32 kbGrpDSUser kbWndw kbWndwMsg

Issue type : kbinfo

Technology : kbWin32SDKSearch kbAudDeveloper kbSDKSearch kbWin32sSearch