WM_SYSCOLORCHANGE Must Be Sent to Windows 95 Common Controls

Last reviewed: September 29, 1995
Article ID: Q129595
The information in this article applies to:
  • Microsoft Win32 Application Programming Interface (API) included with:

        - Microsoft Windows NT version 3.51
        - Microsoft Windows 95 version 4.0
        - Microsoft Win32s version 1.3
    

SUMMARY

You must ensure that applications that use the new common controls introduced in Windows 95 and Windows NT version 3.51 forward the WM_SYSCOLORCHANGE message to the controls.

MORE INFORMATION

Windows 95 makes 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 95 will send 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 reference words: 1.30 4.00 grey
KBCategory: kbui
KBSubcategory: UsrCtl


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 29, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.