Skip to content
⌘ NSIS Forum Archive

Disable the Cancel Function of CANCEL button

8 posts

vins#

Disable the Cancel Function of CANCEL button

Hi,

i need to use the default CANCEL button for other functions like generating log,refresh etc..instead of creating a new button.I am able to rename the cancel button,but still functions the same as CANCEL button.

For example: I need to use the CANCEL button for generating log of my application,how to write code on the Click function of the CANCEL Button.

Please refer the attached screenshot.

thanks in advance
kichik#
You can do what you need in .onUserAbort and then call Abort to cancel the cancel operation.
vins#
Like that how to cancel the close operation of CLOSE button on the right side of the window?

-VINS
vins#
I am a newbie..please guide....

When I use below function, CANCEL button is operating(tats in the left side in pic) and moreover the X-close in top right also intiating the same function as CANCEL.tats y planned to write this code in the click of CLOSE button(in the right side)

Function .onUserAbort
MessageBox MB_YESNO "Do you want to view more information?" IDYES ViewLog
Abort
ViewLog:
nsExec::Exec "$PLUGINSDIR\sys.bat"

ExecShell "" "log.txt"
Abort
FunctionEnd




-VINS
kichik#
The X button is linked to the Cancel button, so you can't have it not do that. Maybe you can use the HelpButton plug-in for what you're looking.