Skip to content
⌘ NSIS Forum Archive

Cannot show 'Cancel' button when installing files!

3 posts

lovespy108#

Cannot show 'Cancel' button when installing files!

!define MUI_PAGE_CUSTOMFUNCTION_PRE MyInstPre
!insertmacro MUI_PAGE_INSTFILES
----------------------------------------------------
Function MyInstPre
GetDlgItem $MUI_TEMP1 $HWNDPARENT 2 //'Cancel'
ShowWindow $MUI_TEMP1 ${SW_SHOW}

GetDlgItem $MUI_TEMP1 $HWNDPARENT 1 //'Next'
ShowWindow $MUI_TEMP1 ${SW_HIDE}

GetDlgItem $MUI_TEMP1 $HWNDPARENT 3 //'Back'
ShowWindow $MUI_TEMP1 ${SW_HIDE}
FunctionEnd
-----------------------------------------------------
When installing files,'Next','Back',and 'Cancel' buttons are disable at the default state of NSIS.So I want to hide
'Next' and 'Back' buttons,and show 'Cancel' button.

With the top codes,I can hide 'Next' and 'Back' buttons,but I can not show 'Cancel' button.what's the reason?

Thanks.🙄 👍 👍
kichik#
Showing or enabling it won't help you. When the user clicks it, the installation process would not be canceled properly.