Old 19th January 2010, 13:21   #1
ChocJunkie
Senior Member
 
Join Date: Oct 2009
Location: Germany
Posts: 120
MUI enable and disable callback function for cancel button

Hi,

I want my installer to go to the finish page if the user clicks 'cancel' on any page. Therefore I'm using
code:
!define MUI_CUSTOMFUNCTION_ABORT _onUserAbort

Function _onUserAbort
[...] // calling function for going to finish page
Abort
FunctionEnd



I need to call 'Abort' because otherwise the installer will quit while executing my function called the line above.

I know, 'MUI_CUSTOMFUNCTION_ABORT' sets the function called when hitting the cancle/X button. When I've reached my finish page, I want to disable the functionality and call another function when clicking cancel/X.
Can I do this using MUI_CUSTOMFUNCTION_ABORT or do I have to use NSD_OnClick on every page?

Thanks!

CJ
ChocJunkie is offline   Reply With Quote
Old 19th January 2010, 14:20   #2
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
How about just making some If statements in your abort function?
MSG is offline   Reply With Quote
Old 20th January 2010, 07:43   #3
ChocJunkie
Senior Member
 
Join Date: Oct 2009
Location: Germany
Posts: 120
Yeah ok, I could have thought about that. ^^'
Thank you for your brilliant idea, MSG.
ChocJunkie is offline   Reply With Quote
Old 20th January 2010, 08:23   #4
ChocJunkie
Senior Member
 
Join Date: Oct 2009
Location: Germany
Posts: 120
Ok, now I remember why I've asked for another solution in first place.

If the user- abort function will be called, the exit function of the current page will never be called, but I need them to be called.
Any ideas?

Thanks

CJ
ChocJunkie 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