0

在这个控件上,

 CONTROL "link", 1002, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 5, 195, 45, 10 

在 nsis 中,

!define MUI_UI "myUi.exe"
!define MUI_PAGE_CUSTOMFUNCTION_SHOW LicenseShow
!insertmacro MUI_PAGE_LICENSE "License.rtf"
...
Function LicenseShow
  ...

  ; Inner window
  FindWindow $0 "#32770" "" $HWNDPARENT

  ; Link
  GetDlgItem $1 $0 1002
  SetCtlColors $1 0x0000FF 0xFFFFFF ; This works
  ${NSD_SetText} $1 "Link to google" ; This works too
  ${NSD_OnClick} $1 on_click_link ; This does NOT work

  ...
FunctionEnd

然后,

Function on_click_link
    ExecShell "open" "http://www.google.com"
FunctionEnd

如何在运行时在此“标签”上添加onClick 事件?我不想为此使用nsDialogs::Create 1018 et nsDialogs::Show

有任何想法吗 ?

4

1 回答 1

1

NSD_On* 回调仅适用于 nsDialogs 页面上的控件,请尝试ButtonEvent 插件...

于 2013-06-21T16:45:36.223 回答