Old 3rd February 2009, 06:47   #1
vins
Junior Member
 
Join Date: Feb 2009
Posts: 9
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
Attached Images
File Type: jpg ref.jpg (12.9 KB, 187 views)
vins is offline   Reply With Quote
Old 3rd February 2009, 11:06   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
You can do what you need in .onUserAbort and then call Abort to cancel the cancel operation.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 4th February 2009, 03:28   #3
vins
Junior Member
 
Join Date: Feb 2009
Posts: 9
thanks much!!!

-VINS
vins is offline   Reply With Quote
Old 4th February 2009, 03:55   #4
vins
Junior Member
 
Join Date: Feb 2009
Posts: 9
Like that how to cancel the close operation of CLOSE button on the right side of the window?

-VINS
vins is offline   Reply With Quote
Old 4th February 2009, 10:31   #5
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Yes, it's the same function.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 4th February 2009, 11:18   #6
vins
Junior Member
 
Join Date: Feb 2009
Posts: 9
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
vins is offline   Reply With Quote
Old 4th February 2009, 20:25   #7
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
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.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 5th February 2009, 03:05   #8
vins
Junior Member
 
Join Date: Feb 2009
Posts: 9
thank u Kitchik....let me try...

-VINS
vins 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