Skip to content
⌘ NSIS Forum Archive

hide the back button

8 posts

M4RC II#

hide the back button

hy i've make a custom page and now I would hide the back button. How can I do this ?

Thx
Afrow UK#
Page Custom CreateFunc
!include WinMessages.nsh

Function CreateFunc
GetDlgItem $R0 $HWNDPARENT 3
ShowWindow $R0 ${SW_HIDE}
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "ioFile.ini"
FunctionEnd

-Stu
M4RC II#
Hy thx it works.

I've further two other questions:

1. Right above is the symbol close. Can I deactivate this as maximize?

2. How can I hide the back button from the finish page ?

Thank you
Animaether#
1. You'd have to change the window styles using the System plugin. edit: I don't think you can, actually - once the window has been created, I don't think you can change its style.

2. Using much the same method as you did Afrow showed before. If you are using the Modern UI:
!define MUI_PAGE_CUSTOMFUNCTION_PRE FinishPre
!insertmacro MUI_PAGE_FINISH
Function FinishPre
  GetDlgItem $R0 $HWNDPARENT 3
  ShowWindow $R0 ${SW_HIDE}
FunctionEnd 
M4RC II#
Hy thx for your help. My last question:

Is it possible only to disable (not hide) a button?

Thank you to all who help me.
Animaether#
Yes,

  GetDlgItem $R0 $HWNDPARENT 3 
  ShowWindow $R0 ${SW_HIDE} 
would become
  GetDlgItem $R0 $HWNDPARENT 3 
  EnableWindow $R0 0|1 # 0=hide, 1=show 
M4RC II#
Thx animaether it works.

🙄 i know i've write that it was my last question but how can i disable the cancel button?

Thank you🙂
Animaether#
# next button
GetDlgItem $R0 $HWNDPARENT 1
# cancel button
GetDlgItem $R0 $HWNDPARENT 2
# back button
GetDlgItem $R0 $HWNDPARENT 3 
You can use utilities such as WinSpy++ to get these numbers (Control IDs) from a dialog;