Skip to content
⌘ NSIS Forum Archive

Color Schemes

8 posts

resista#

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!
kichik#
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:
resista#
Oh, yes. it works after a reboot. Thats great but is it possible to activate it right away?
resista#
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.
kichik#
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.