簡體   English   中英

NSIS安裝程序nsDialog復選框未出現,因為我認為它應該出現

[英]NSIS installer nsDialog checkbox not appearing as I think it should

我正在向NSIS安裝程序添加自定義頁面,但無法添加復選框。 我所看到的所有示例看起來都一樣,這就是我正在做的事情,但是我看不出有什么問題。 (我只使用NSIS一個小時左右!)。

!include MUI2.nsh
!include WordFunc.nsh
!insertmacro VersionCompare
!include LogicLib.nsh
!include InstallOptions.nsh
!include nsDialogs.nsh

Name "xxxxx"
;!define MUI_ICON "bcs.ico"
;!define MUI_HEADERIMAGE
;!define MUI_HEADERIMAGE_BITMAP "bcs.bmp"
;!define MUI_WELCOMEFINISHPAGE_BITMAP "bcs164.bmp"
;!define MUI_HEADERIMAGE_RIGHT

OutFile "nqcs_setup.exe"
InstallDir "$PROGRAMFILES\xxxx"
InstallDirRegKey HKLM "Software\xxxx" "InstallDir"
RequestExecutionLevel admin

Var Dialog
Var Heading
Var ServiceQuestion
Var SvcCheckBox

Function installOptionsPage

    nsDialogs::Create 1018
    Pop $Dialog

    ${If} $Dialog == error
        Abort
    ${EndIf}

    ${NSD_CreateLabel} 0 0 100% 50 "Installation Options"
    Pop $Heading
    CreateFont $0 "$(^Font)" "14" "500"
    SendMessage $Heading ${WM_SETFONT} $0 1

    ${NSD_CreateLabel} 0 50 100% 20 "Would you like to install as a service?"
    Pop $ServiceQuestion
    CreateFont $0 "$(^Font)" 11
    SendMessage $ServiceQuestion ${WM_SETFONT} $0 1

    ${NSD_CreateCheckbox} 50 50 100% 15 "Checkbox Test"
    Pop $SvcCheckBox
    ;GetFunctionAddress $0 OnCheckbox
    nsDialogs::OnClick $SvcCheckBox $0

    nsDialogs::Show

FunctionEnd

頁面出現時,復選框不存在:

nsis nsdialog復選框問題

我的問題很傻。 標簽僅在復選框上方,使其不可見。 我的錯。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM