resista
14th October 2002 14:48 UTC
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
14th October 2002 16:44 UTC
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
resista
14th October 2002 22:01 UTC
it doesnt work!
but the script compiles so its not a typo
kichik
15th October 2002 16:00 UTC
After you reboot does it use the new color scheme? Do you get any warnings when compiling?
resista
16th October 2002 19:08 UTC
Oh, yes. it works after a reboot. Thats great but is it possible to activate it right away?
kichik
16th October 2002 19:54 UTC
Did you get any warnings when you compiled?
resista
16th October 2002 20:30 UTC
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
17th October 2002 14:24 UTC
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.