How to change Windows Color Scheme
Posted on 2001-07-20
My project is something like the Desktop Theme Manager in Windows 98 (difference is that it's in the background). I want to maintain the desktop settings of >100 Company PCs running Win98. My program runs after every logon. The purpose of this is to discard any changes made by the users. They seem to bypass the security.
I have successfully changed the wallpaper to the company logo by updating the registry and calling SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, 0, SPIF_SENDWININICHANGE). I have also updated the color settings in HKEY_CURRENT_USER\Control Panel\...
My problem is that I cannot tell Windows to refresh so that the new color scheme will take effect. When I looked at the Display properties, the change was reflected. Broadcasting WM_SYSCOLORCHANGE doesn't work. SetSysColors can change the colors but the settings are lost after the logoff/shutdown. I've read about SetSystemPaletteUse in the SDK but I don't seem to understand the documentation.