INFO: Must Send WM_SYSCOLORCHANGE to Windows 95 Common Controls

ID: Q129595


The information in this article applies to:
  • Microsoft Win32 Software Development Kit (SDK)
  • Microsoft Windows 2000


SUMMARY

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


MORE INFORMATION

Windows 95 and later and Windows NT version 4.0 and 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 kbWinOS2000 kbSDKWin32 kbGrpUser kbWndw kbWndwMsg
Version : WINDOWS:
Platform : WINDOWS
Issue type : kbinfo


Last Reviewed: February 2, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.