Old 25th June 2012, 23: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, 23:44   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
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
Afrow UK is offline   Reply With Quote
Old 26th June 2012, 09:35   #3
T.Slappy
Major Dude
 
T.Slappy's Avatar
 
Join Date: Jan 2006
Location: Slovakia
Posts: 549
Send a message via ICQ to T.Slappy
This is often asked for feature. Maybe it will be added in next release.

Cool looking installers with custom design: www.graphical-installer.com
Create Setup Pages easily: www.install-designer.com
Build installers in Visual Studio 2005-2019: www.visual-installer.com
or RAD Studio 2009, 2010, XE-10.4 Sydney: www.rad-installer.com
T.Slappy is offline   Reply With Quote
Old 26th June 2012, 09:49   #4
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
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, 10:24   #5
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,321
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, 06:07   #6
T.Slappy
Major Dude
 
T.Slappy's Avatar
 
Join Date: Jan 2006
Location: Slovakia
Posts: 549
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

Cool looking installers with custom design: www.graphical-installer.com
Create Setup Pages easily: www.install-designer.com
Build installers in Visual Studio 2005-2019: www.visual-installer.com
or RAD Studio 2009, 2010, XE-10.4 Sydney: www.rad-installer.com
T.Slappy is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast 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