Skip to content
⌘ NSIS Forum Archive

disable back button

7 posts

crisp#

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#
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#
Is there a solution to this?

I'm needing to disallow going back from the components page.

-Tim
Joost Verburg#
Get the handle of the Back button using GetDlgItem (the ID of the back button is 3) and use EnableWindow to disable it.
treehousetim#
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