Archive: Color Schemes


Color Schemes
Im building a litestep distro installer, wich installs a color scheme.
That is no problem, but thething is that the user have to change the active scheme manually.

Is there anyway to activate a certain color scheme? Its Windows 9X and 2K schemes i am talking about. Not XP, but that would of course be interesting to!


Write your scheme name to "HKEY_CURRENT_USER\Control
Panel\Appearance\Current" and then broadcast WM_SYSCOLORCHANGE to all top level windows.

To broadcast with the latest CVS veresion of NSIS 2 include WinMessages.NSH and use:
SendMessage ${HWND_BROADCAST} ${WM_SYSCOLORCHANGE} 0 0 /TIMEOUT=5000

If you are not using the latest CVS version you will have to write a custom DLL to do the trick, or use System.dll by brainsucker.

Information from:
http://groups.google.com/groups?q=%2...tngxa08&rnum=6


it doesnt work!

but the script compiles so its not a typo


After you reboot does it use the new color scheme? Do you get any warnings when compiling?


Oh, yes. it works after a reboot. Thats great but is it possible to activate it right away?


Did you get any warnings when you compiled?


Sorry, it does not use the new scheme after reboot. In Display properties it is chosen, but still not active. I have to chosse it again to get it to work! Im on W2K by the way, if that matters.

No, i dont get any warnings.


Then I guess you will have to use SetSysColors with an extension DLL too... It will replace the colors on the spot. If you change the registry too it should work after a reboot.