删除NSIS安装程序底部的按钮窗格

时间:2020-09-23 06:21:59

标签: nsis

我正在使用NSIS创建仅具有自定义页面的安装程序。 自定义页面不应具有默认按钮(“上一步”,“下一页”或“取消”),而页面中心仅应包含1个按钮。 如所附图像中突出显示的那样,有什么办法可以移除整个底部窗格? 我已经隐藏了按钮,但是我也想删除分隔线和它下面的部分。

这是我的代码:

;--------------------------------
;Include Modern UI
  !include "MUI2.nsh"

;--------------------------------
;General

  ;Name and file
  Name "Custom Test"
  OutFile "custom_installer.exe"

  ;Default installation folder
  InstallDir "$LOCALAPPDATA\Custom Test"

  ;Remove default branding text of Nullsoft
  BrandingText " "

;--------------------------------
;Interface Settings
  !define MUI_LICENSEPAGE_BGCOLOR "814EFA"
  !define MUI_ABORTWARNING
  !define MUI_BGCOLOR "000000"

;--------------------------------
;Functions
Function Start
  nsDialogs::Create 1044
  Pop $0
    SetCtlColors $0 222425 FBFBFB
  
  ${NSD_CreateButton} 20 170 90% 15u INSTALL

  GetDlgItem $0 $HWNDPARENT 3 ; Back Button
  GetDlgItem $1 $HWNDPARENT 1 ; Next/Close Button
  GetDlgItem $2 $HWNDPARENT 2 ; Cancel Button
  
  ShowWindow $0 ${SW_HIDE}
  ShowWindow $1 ${SW_HIDE}
  ShowWindow $2 ${SW_HIDE}

    nsDialogs::Show
FunctionEnd

;--------------------------------
;Pages

  Page custom Start
  !insertmacro MUI_PAGE_COMPONENTS

;--------------------------------
;Languages
 
  !insertmacro MUI_LANGUAGE "English"

;--------------------------------
;Installer Sections

Section "Dummy Section" SecDummy

  SetOutPath "$INSTDIR"

SectionEnd

这是安装程序页面现在的样子: enter image description here

1 个答案:

答案 0 :(得分:0)

使用 SetBrandingText“” 隐藏水平线并使用 SetCtlColors $ 0 222425 FBFBFB 为底部着色怎么办?它看起来就像对话框的其余部分一样?< / p>

对您来说还是可以接受的,或者您想缩小对话框(降低对话框的高度)?

相关问题