在此控件上,
CONTROL "link", 1002, STATIC, SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 5, 195, 45, 10
现在,
!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 。
有什么想法吗?