Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 25th June 2012, 22:21   #1
rthawley
Junior Member
 
Join Date: Jun 2012
Posts: 6
Cancel button in nsDialogs

How do I tell if the Cancel button has been pressed in a nsDialogs dialogbox?
rthawley is offline   Reply With Quote
Old 25th June 2012, 22:44   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
nsDialogs doesn't appear to have a built in handler so the best thing I can think of is to set a variable to 1 before ::Show and to 0 in the custom page's leave callback function (and in the previous page's pre callback function if there is a previous page). Then check the variable value in your abort callback function (set using MUI_CUSTOMFUNCTION_ABORT) to determine whether or not the user cancelled while on your custom page. Your other option is to write a plug-in which grabs the value of extra_parameters->abort (set to 1 after Cancel has been pressed).

Stu

Need an installer? http://www.afrowsoft.co.uk
Afrow UK is offline   Reply With Quote
Old 26th June 2012, 08:35   #3
T.Slappy
Senior Member
 
T.Slappy's Avatar
 
Join Date: Jan 2006
Location: Slovakia
Posts: 361
Send a message via ICQ to T.Slappy
This is often asked for feature. Maybe it will be added in next release.

Create cool looking Graphical Installers in NSIS: www.graphical-installer.com -see below
I offer NSIS scripting, C/C++/C#/Delphi programming: www.unsigned-softworks.sk
Develop NSIS projects directly in Visual Studio 2005-2012: www.unsigned-softworks.sk/visual-installer/
T.Slappy is offline   Reply With Quote
Old 26th June 2012, 08:49   #4
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,839
Quote:
Originally Posted by T.Slappy View Post
Maybe it will be added in next release.
Why, are you planning to add it?
MSG is offline   Reply With Quote
Old 26th June 2012, 09:24   #5
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 2,775
You should really only make changes outside $pluginsdir on the instfiles page so IMHO catching cancel seems wrong...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 27th June 2012, 05:07   #6
T.Slappy
Senior Member
 
T.Slappy's Avatar
 
Join Date: Jan 2006
Location: Slovakia
Posts: 361
Send a message via ICQ to T.Slappy
Quote:
Originally Posted by MSG View Post
Why, are you planning to add it?
Yes that's the plan, but there is too much items on my To-Do list

Create cool looking Graphical Installers in NSIS: www.graphical-installer.com -see below
I offer NSIS scripting, C/C++/C#/Delphi programming: www.unsigned-softworks.sk
Develop NSIS projects directly in Visual Studio 2005-2012: www.unsigned-softworks.sk/visual-installer/
T.Slappy is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

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