Skip to content
⌘ NSIS Forum Archive

SkinnedButtons

13 posts

Bungkai#

SkinnedButtons

Trying to use this plugin, but I'm encountering an issue that I'm guessing shouldn't really be happening.

The buttons for the installer of SkinnedButton itself are not showing. I've been using ResourceHacker a bit, so I thought that that may have been an issue and thus have uninstalled NSIS and all the plugins and reinstalled the latest and greatest version of NSIS. Tried again with Skinned button and I still get this:



The buttons STILL work as if they're there, but they're all invisible. Wouldn't be an issue if it still works on the installers that I'm working on, but they're invisible there as well. Tried the examples for in NSIS/Examples/skinnedbuttons and those have invisible buttons also. Only happens when I try to use it SkinnedButtons. Buttons appear otherwise. Compatibility issues with the latest and greatest of NSIS? Or something else?
Anders#
Just saying latest NSIS is not really helpful, if would be more helpful if you said v2.50 or v3.0beta2.

Hopefully Slappy will know what to do as he is the author of the latest version of this plugin.
Anders#
Originally Posted by Bungkai View Post
Yeah, indeed v3.0beta2.

I'm running Windows 8.1 64-bit if that helps in any way.
Are you using "Unicode true" in your script?
Bungkai#
I am not. In case I was supposed to, I just tried and I got the following error message:



But I do not see why it would affect the installation of SkinnedButton itself. I figured at least that should still have it's own buttons.
Anders#
It sounds to me like it might be a bug in the plugin, maybe it was never tested on Windows 8.

Last question, are you using a custom visual style or just the default theme? Have you patched uxtheme.dll?
Anders#
This plugin has many problems (IMHO) but this drawing issue is caused by the plug-ins drawing function that tries to not draw on controls created by the InstallOptions plug-in. Internal changes in Windows causes this check to always evaluate to true so nothing is drawn so you get blank buttons. If anyone wants to fix this plugin; if the WndProc is in USER32, NTDLL or UXTHEME then you should not consider it subclassed.

Other issues in the plugin that should be fixed:
  • Only change DWL_USER on windows you created (and even then you are bending the rules)
  • Not sure what WM_USER+0x9 is but you should probably not invent your own messages in this range!
  • popstring usage can cause buffer overflow
  • Don't change GWL_EXSTYLE on hwndparent
  • Does not pass FORMAT_MESSAGE_IGNORE_INSERTS to FormatMessage
  • v1.2: If LoadBitmap fails, stack is corrupted because the color is not pop'ed
  • sscanf should not be combined with _DllMainCRTStartup, it works right now but this could break at any point
Anders#
I made a new test version of this plugin. I did not test much so I don't know if it is actually fully compatible with the old plugin or if it works at all.
T.Slappy#
I cannot remember everything but I suppose there were some issues on 64bit systems.
I think it was not fixed in most recent version. I will compare Anders version.
Bungkai#
So is this a dead end? Anders, I tried your new test version and there are still invisible buttons, and SetCtlColors do not work on the buttons either.
Anders#
Originally Posted by Bungkai View Post
So is this a dead end? Anders, I tried your new test version and there are still invisible buttons, and SetCtlColors do not work on the buttons either.
Is my example .nsi also broken? (Make sure you actually copied the .dll to the plugins directory!) It worked fine for me on Windows 8.0 64-bit. My version does not support SetCtlColors but you specify the text color as a parameter. It shares no code with the other plug-in.

This is not really my plug-in so I don't know how much time I want to spend on this but I'll take one more look this weekend...
Bungkai#
Originally Posted by Anders View Post
(Make sure you actually copied the .dll to the plugins directory!)
http://forums.winamp.com/attachment....1&d=1459454753

I thought I did. I did not. It works. It's fantastic. I'll go back to my corner now.