Skip to content
⌘ NSIS Forum Archive

A bug and a question..

14 posts

mgillespie#

A bug and a question..

First the bug:

Latest CVS has a problem with the latest MUI. The Reboot dialog has incorrect background colours for the reboot now, manual reboot text.

CVS from a few days ago is fine.

Now the question:

I have the following custom dialog:



As you can see, I have my Copy code implemented in the "next", this works fine, but I'm having a problem in the "skip" button, this is the Cancel action. Obviously this aborts the install completly. I want to skip to the next dialog. Can this be done. I have tried allsorts, without any luck.
mgillespie#
I don't know if the picture is showing on this message (it's not for me). You can see the custom dialog in question here:

Afrow UK#
You need to move your code from your next function to here:
Function CustomDialog
InstallOptions::dialog "mydialog.ini"
Pop $R0
StrCmp $R0 cancel exitpage

myfunction:
##do you're next function ere###

exitpage:
FunctionEnd
-Stu
kichik#
On second thought, you can use the same method that I suggested in this recent thread:
Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.


Just send that message if you get cancel from IO.
mgillespie#
I'm kinda stuck, as the MUI does not allow me to place buttons on it (if I could do this, I could have a dedicated Copy button, and leave next and cancel as they are).

Looking for inspiration on what to do now.
mgillespie#
Not working yet...

Here is my code..

Push $CustomDialogKeyPress
InstallOptions::dialog "$PLUGINSDIR\rtx.ini"
Pop $CustomDialogKeyPress
;process the return from the dialog
StrCmp $CustomDialogKeyPress "cancel" CancelPressed
StrCmp $CustomDialogKeyPress "back" GoodKeyCopy

CancelPressed:
; sending this OK message (is this too late???)
SendMessage $HWNDPARENT ${WM_COMMAND} ${IDOK} 0


GoodKeyCopy:
mgillespie#
Thanks. It turns out the SendMessage is a nogo for the Cancel, as it's already in the process of quitting.

I have inplemented it on the "back" and kichik SendMessage trick works fine.

Thanks.