- NSIS Discussion
- SkinnedButton 1.21 development version
Archive: SkinnedButton 1.21 development version
OldGrumpy
17th March 2006 09:05 UTC
SkinnedButton 1.21 development version
Hi everybody,
after quite some tedious work, I have a new version ready for testing. It still contains quite some diagnostic code so don't bother about the size ;) This version of the dll performs proper skinning of bigtest.nsi with the UltraModernUI, without additional tweaks to the NSIS sources. Well, at least for me it is working now ;)
So I'm asking everybody who is interested in skinned buttons to test the plugin and check if really all buttons will be skinned properly now. If you find some that won't work, please tell me :)
zeeh3
17th March 2006 09:39 UTC
Same unskinned buttons problem after messagebox appearance.
The sript:
Name "Test"
OutFile "Test.exe"
!include "MUI.nsh"
!define MUI_CUSTOMFUNCTION_GUIINIT begin
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE Messagebox
!insertmacro MUI_PAGE_WELCOME
Page Custom Custom Leave
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"
XPStyle off
Function .onInit
InitPluginsDir
File "/oname=$PLUGINSDIR\button.bmp" \
"${NSISDIR}\Contrib\skinnedbutton\skins\ishield.bmp"
FunctionEnd
Function Messagebox
#here is the problem, try to remove leave function to see that
#buttons on the custom page become skinned again
MessageBox MB_OK "This button is not skinned and this messagebox \
makes next custom page buttons unskinned..."
Functionend
Function Custom
InstallOptions::dialog "$EXEDIR\test.ini"
Pop $R0
FunctionEnd
Function Leave
ReadINIStr $R0 "$EXEDIR\test.ini" "Settings" "State"
StrCmp $R0 1 0 Continue
#after clicking here the buttons are skinned again
MessageBox MB_OK|MB_ICONEXCLAMATION "You clicked me!"
Abort
Continue:
FunctionEnd
Function begin
skinnedbutton::skinit /NOUNLOAD "$PLUGINSDIR\button.bmp"
Functionend
Function .onGUIEnd
skinnedbutton::unskinit
FunctionEnd
Section ""
SectionEnd
test.ini file:
[Settings]
NumFields=2
[Field 1]
Type=Button
Left=20
Right=-20
Top=20
Bottom=33
Text=Click me!
Flags=NOTIFY
[Field 2]
Type=GroupBox
Left=10
Right=-10
Top=9
Bottom=-9
Text=Test
OldGrumpy
17th March 2006 10:16 UTC
The message box is a system message box which is created as another top-level window, not as a child window, so I can't skin it directly. I'll see what I can do about that. The unskinned back button on the next page is astonishing, though. Up to now, I just played with the UltraModernUI which has an integrated message box pane - so this bug does not show up at all. Thanks for the feedback, gotta see what I can do about the additional top level window.
OldGrumpy
17th March 2006 15:32 UTC
Okay, I can now skin the message box button. The method of wansis and skinnedbutton plugins are not sufficient to accomplish this, so I stripped a lot of code and rewrote most of the rest. The only strange thing is that after clicking the message box button, the back button becomes unskinned again *big sigh*
Oh, btw, should the large "Click me!" button become skinned too? It looks pretty ugly *g*
zeeh3
17th March 2006 19:20 UTC
Originally posted by OldGrumpy
...
Oh, btw, should the large "Click me!" button become skinned too? It looks pretty ugly *g*
Yes, this button should be skinned (all buttons on the custom page should be too).
OldGrumpy
17th March 2006 19:30 UTC
Hmm, the "Click me!" is a html link, isn't it?
By the way, I can skin all of them now, except for "Click me" and I have to fix some redraw issues. Put it in the background and bring it to the foreground again and everything looks okay *sigh*
zeeh3
17th March 2006 19:56 UTC
Nope, "Click me" calls MessageBox MB_OK|MB_ICONEXCLAMATION "You clicked me!", no html here.
SuperPat45
17th March 2006 21:24 UTC
I have tested this version:
there is no more problem withe the startmenu page :-),
I have modified with ressourceshacker the modern.exe UI to replace the property of "Show Detail" button from BS_PUSHBUTTON to BS_OWNERDRAW but it remain unskinned, and if I click on it, the next button is unskinned.
We are on the good way!
OldGrumpy
17th March 2006 21:37 UTC
SuperPat45:
If you followed my old instructions, you have to edit ui.c from the NSIS sources and recompile NSIS to get the exehead files with the required modifications. With these modifications, the Show Details button will be skinned and the Next button too. But this is already outdated by now. I've implemented a new way of skinning buttons, I just have some minor problems with keeping an eye on childwindows and some window refresh problems I don't fully understand by now. I can launch the test.exe and it looks misdrawn, place another window in front of it and when I remove the other window, test.exe looks okay. So everything gets drawn nicely, just not at the right time ;)
I've broken some bits while implementing the new system for the messageboxes. I have to re-implement the skinning for childwindows completely. That means I'll still use the draw routines from wansis but that's about all that's left from the old skinnedbutton plugin. A lot of new code has been integrated.
SuperPat45
17th March 2006 21:48 UTC
OK,
I am impatient to see that, and in particular the source code.
If you could add some comments for the comprehension in the source code, that would help me much to understand it...
OldGrumpy
18th March 2006 09:43 UTC
I'll attach the sample installer I built from zeeh3's script for demo purposes. As I said, it still has some issues I am currently investigating. But the messagebox is skinned now ;)
zeeh3
18th March 2006 11:56 UTC
Don't forget to put test.ini in the same directory of test.exe or the custom page won't appear. Can you post the script? It is not working for me, no skinned buttons at all :(
SuperPat
18th March 2006 12:00 UTC
I tested the example but no button is skinned.
OldGrumpy
18th March 2006 12:40 UTC
Yeah, simple but effective fault. I forgot to replace the debug version of the dll with the release version. Most systems out there have no debug runtime dlls installed, that means loading of the skinnedbutton.dll fails and thus no skinned buttons at all. Find the correct version attached, please :)
And BTW, SuperPat45: Please shrink the picture in your signature a bit, it voids the forum formatting :(
SuperPat
21st March 2006 11:49 UTC
OldGrumpy,
Now what SkinnedButton can skin the messagebox buttons,
Would be possible to make small NSIS plug-in making possible to change the text color and the background color of the messagesbox?
(il would make very pretty with UltraModernUI and SkinnedButton)?
OldGrumpy
21st March 2006 18:07 UTC
Hmm, I can't promise that it will work, but I'll see what I can do. But first of all, I'd like to fix the still unskinned buttons. Lots of work... Unfortunately, my real life consumes almost all of my time. It will take about 1-2 weeks until things get better. So stay tuned :)
SuperPat
23rd March 2006 14:47 UTC
OK Thanks
SuperPat
22nd July 2006 22:48 UTC
Hello,
OldGumpy, please, can you send me the lastest version of your SkinnedButton source-code modifiactions?
I need it to continue its developpment and that of UltraModernUI.
Thank you in advance.
T.Slappy
30th July 2006 22:36 UTC
xpstyle on
Hi
I made installer with full background image and I would like to use your plugin with
XPStyle turned ON
Check my topic: http://forums.winamp.com/showthread....hreadid=251710
But I did it with XPStyle off ........
Could you fix it to work with v XPStyle turned ON ?
It would greatly help me
SuperPat
30th July 2006 23:22 UTC
I would like to, but, I think that it is impossible because if you see the skinned installshield installers, they are all with the XPStyle at off.
And unfortunately, I am not necessary knowledges in the win32 api.