Archive: Graphical Installer problem with custom buttons


Graphical Installer problem with custom buttons
  I just shifted to include the Graphical Installer plugin in my installer, but I have a problem regarding buttons. I made a test with my code, and everything worked fine, except for a couple of warning messages.

"SkinnedControls error: T."
and
"Color of button text has wrong format, check the GRAPHICAL_INSTALLER_BUTTONS_TEXT_COLOR and GRAPHICAL_INSTALLER_BUTTONS_TEXT_COLOR_DOWN defines."

I have already checked those defines, and they seem fine. The custom .bmp for my buttons skin is size 47x45 px according to instructions, and I left the default text color for them (0xFFFFFF), but I still get those 2 error windows while running the installer.

Also, I checked and tried the included examples, but they have the same problem. Has anybody had this same problem?


Hi.
Solution is simple:
If you use standard NSIS use Standard SkinnedControls plugin
If you use UNICODE NSIS use Unicode SkinnedControls plugin.

These plugins are available to download here from forum, but I also sent you a link.

There are some problems related to Unicode NSIS - http://forums.winamp.com/showthread.php?t=326288 and thus SkinnedControls plugin has two versions: Unicode and NonUnicode.
Mixing them with NSIS may result in this error.


Thank you for your assistance. I just switched to Standard SkinnedControls plugin and the warnings disappeared.


I have another problem related to SkinendControls and I hope someone can help me.
When I pop-up a messagebox, the buttons on the UI become un-skinned again, so I have this ugly effect of unskinned buttons on a nice UMUI interface...
I tried rerunning the plugin after the messagebox but apparently you can only run it on guiInit

Any ideas?


Originally posted by Tallmaris
I have another problem related to SkinendControls and I hope someone can help me.
When I pop-up a messagebox, the buttons on the UI become un-skinned again, so I have this ugly effect of unskinned buttons on a nice UMUI interface...
I tried rerunning the plugin after the messagebox but apparently you can only run it on guiInit

Any ideas?
This problem is related to SkinnedControls, UMUI or Graphical Installer does not affect it.
I suppose that calling skinning method from plugin might work, but the plugin lacks of method for skinning single control.
I will have a look on it.

Originally posted by Tallmaris
I have another problem related to SkinendControls and I hope someone can help me.
When I pop-up a messagebox, the buttons on the UI become un-skinned again, so I have this ugly effect of unskinned buttons on a nice UMUI interface...
I tried rerunning the plugin after the messagebox but apparently you can only run it on guiInit

Any ideas?
Originally posted by T.Slappy
This problem is related to SkinnedControls, UMUI or Graphical Installer does not affect it.
I suppose that calling skinning method from plugin might work, but the plugin lacks of method for skinning single control.
I will have a look on it.
I found quick butdirty solution, which is a little hacky.
SkinnedControls.dll and source is attached (non Unicode, converted to VS 2008)

All you need is to call exactly this message always you want to redraw buttons.

    SendMessage $HWNDPARENT ${WM_MENUDRAG} 0 0 

>
e.g.:
MessageBox MB_OK "This message causes SkinnedControls bug..." ; ; After clicking OK the buttons lost their skin
SendMessage $HWNDPARENT ${WM_MENUDRAG} 0 0 ; Force reskin


I used WM_MENUDRAG message [which is normally unused] to notify window to put another refresh message into queue -> to force redrawing. See the source code how it works.

I made wiki page for SkinnedControls plugin http://nsis.sourceforge.net/SkinnedControls_plug-in (sources are attached), if you change something in the code, please mention it there too.