crisp
22nd August 2003 16:00 UTC
disable back button
Hello.
Sorry to dump this in the forum but I couldn't find anything in the docs, in the forum,or in the archives.
I guess this is an very old question .... :(
I need to disable the back button once I reach the components page.
I know how to disable the backbutton on a custom page. but I don't know how to do that on a normal page.
Any ideas ?
Thanks,
Crisp
Afrow UK
23rd August 2003 12:11 UTC
Maybe you could get it to call Abort from the page's Pre function (not the current page, but the page before it)
This way when the user clicks back, he won't go anywhere.
Page Components CompPre
Page Directory DirPre
Function CompPre
StrCmp $R0 Abort 0 +2
Abort
FunctionEnd
Function DirPre
StrCpy $R0 Abort
FunctionEnd
-Stu
treehousetim
19th May 2004 15:47 UTC
Is there a solution to this?
I'm needing to disallow going back from the components page.
-Tim
Joost Verburg
19th May 2004 16:16 UTC
Get the handle of the Back button using GetDlgItem (the ID of the back button is 3) and use EnableWindow to disable it.
treehousetim
19th May 2004 18:37 UTC
an example of this would be extremely helpful, using the getdlgitem and sendmessage functions in nsis have been extremely confusing for me.
thanks for your time,
-Tim
Joost Verburg
19th May 2004 21:45 UTC
Var BACKBUTTON
GetDlgItem $BACKBUTTON $HWNDPARENT 3
EnableWindow $BACKBUTTON 0
treehousetim
19th May 2004 22:33 UTC
it all seems so simple now! :)
thank you very much, you've made my day.
-Tim