Old 16th February 2011, 18:16   #1
Armatron
Junior Member
 
Join Date: Nov 2009
Posts: 3
Exclamation 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?
Armatron is offline   Reply With Quote
Old 17th February 2011, 08:26   #2
T.Slappy
Major Dude
 
T.Slappy's Avatar
 
Join Date: Jan 2006
Location: Slovakia
Posts: 545
Send a message via ICQ to T.Slappy
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.

Cool looking installers with custom design: www.graphical-installer.com
Design NSIS setup Pages easily: www.install-designer.com
Build NSIS installers in Visual Studio 2005-2019: www.visual-installer.com
or RAD Studio 2009, 2010, XE-10.3 Rio: www.rad-installer.com
T.Slappy is offline   Reply With Quote
Old 17th February 2011, 22:49   #3
Armatron
Junior Member
 
Join Date: Nov 2009
Posts: 3
Thank you for your assistance. I just switched to Standard SkinnedControls plugin and the warnings disappeared.
Armatron is offline   Reply With Quote
Old 3rd March 2011, 08:39   #4
Tallmaris
Junior Member
 
Join Date: Jan 2011
Posts: 10
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?
Tallmaris is offline   Reply With Quote
Old 20th March 2011, 06:18   #5
T.Slappy
Major Dude
 
T.Slappy's Avatar
 
Join Date: Jan 2006
Location: Slovakia
Posts: 545
Send a message via ICQ to T.Slappy
Quote:
Originally Posted by Tallmaris View Post
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.

Cool looking installers with custom design: www.graphical-installer.com
Design NSIS setup Pages easily: www.install-designer.com
Build NSIS installers in Visual Studio 2005-2019: www.visual-installer.com
or RAD Studio 2009, 2010, XE-10.3 Rio: www.rad-installer.com
T.Slappy is offline   Reply With Quote
Old 22nd March 2011, 15:22   #6
T.Slappy
Major Dude
 
T.Slappy's Avatar
 
Join Date: Jan 2006
Location: Slovakia
Posts: 545
Send a message via ICQ to T.Slappy
Quote:
Originally Posted by Tallmaris View Post
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?
Quote:
Originally Posted by T.Slappy View Post
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.
PHP Code:
    SendMessage $HWNDPARENT ${WM_MENUDRAG0 0 
e.g.:
code:
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.

Cool looking installers with custom design: www.graphical-installer.com
Design NSIS setup Pages easily: www.install-designer.com
Build NSIS installers in Visual Studio 2005-2019: www.visual-installer.com
or RAD Studio 2009, 2010, XE-10.3 Rio: www.rad-installer.com
T.Slappy is offline   Reply With Quote
Old 24th March 2011, 15:45   #7
T.Slappy
Major Dude
 
T.Slappy's Avatar
 
Join Date: Jan 2006
Location: Slovakia
Posts: 545
Send a message via ICQ to T.Slappy
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.

Cool looking installers with custom design: www.graphical-installer.com
Design NSIS setup Pages easily: www.install-designer.com
Build NSIS installers in Visual Studio 2005-2019: www.visual-installer.com
or RAD Studio 2009, 2010, XE-10.3 Rio: www.rad-installer.com
T.Slappy is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
button, graphical installer, plugin, text

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump