0

所以这就是我设置密码的方法。我想知道我是如何做到的,以便页面上有一个标签或文本框,要求您输入密码。截至目前,它是空白的。有任何想法吗

!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
4

1 回答 1

1
...
${NSD_CreateLabel} 0 2d 70d 16d "Password:"
Pop $0
${NSD_CreatePassword} 70d 0 50% 20d ""
Pop $hwnd
...
于 2013-07-10T16:16:11.200 回答