标签或文本框

时间:2013-07-10 12:59:00

标签: nsis

所以这就是我设置密码的方法。我想知道我是如何制作的,以便页面上有一个标签或文本框,让您输入密码。至于现在,它是空白的。任何想法

!include "nsDialogs.nsh"
!include "winmessages.nsh"
!include "logiclib.nsh"

Page Custom pre leave



var dialog

var hwnd

Function leave

${NSD_GetText} $hwnd $0

${If} $0 != "Password"

    MessageBox MB_OK "Please enter a valid Security Code"

    Abort

${EndIf}

FunctionEnd

Function pre

 nsDialogs::Create 1018

  Pop $dialog



 ${NSD_CreatePassword} 0 0 50% 8% ""

     Pop $hwnd

 SendMessage $hwnd ${EM_SETPASSWORDCHAR} 149 0 # 149 = medium dot



nsDialogs::show

FunctionEnd

1 个答案:

答案 0 :(得分:1)

...
${NSD_CreateLabel} 0 2d 70d 16d "Password:"
Pop $0
${NSD_CreatePassword} 70d 0 50% 20d ""
Pop $hwnd
...