在我的安装程序的许可证页面中,我想使用超链接而不是文本框。链接将包含我的网页地址,其中包含许可协议。
我已经隐藏了文本框,现在问题是添加链接。我想添加这样的东西:
单击此处阅读许可协议。
我尝试使用 Linker 插件以及 NSD_createlink 但在这两种情况下安装程序都会崩溃。
我怎样才能使它工作?
编辑:
我正在尝试仅创建 ID 1006 的链接。
以下是我的代码,现在它没有崩溃,但也没有工作。
; For license page.
Function LicensePageShow
nsResize::Set $mui.LicensePage.TopText 120 180 250u 200u
;LogSet on
Call GetDateTime
Pop $dt
logex::Write "$dt In LicensePageShow "
GetDlgItem $0 $HWNDPARENT 1036
ShowWindow $0 ${SW_HIDE}
GetDlgItem $0 $HWNDPARENT 1045
ShowWindow $0 ${SW_HIDE}
GetDlgItem $0 $HWNDPARENT 1035
ShowWindow $0 ${SW_HIDE}
/* Hiding default License text box */
FindWindow $R0 `#32770` `` $HWNDPARENT
GetDlgItem $R0 $R0 1000
nsResize::Set $R0 0 0 0 0
ShowWindow $R0 ${SW_HIDE}
/* The License page Text */
FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $0 $0 1006
Linker::link /NOUNLOAD $0 "http://www.google.com"
FindWindow $R0 `#32770` `` $HWNDPARENT
GetDlgItem $R0 $R0 1038
ShowWindow $R0 ${SW_HIDE}
FindWindow $R0 `#32770` `` $HWNDPARENT
GetDlgItem $R0 $R0 1040
nsResize::Set $R0 50 80 300u 20u
System::Call '*(i,i,i,i)i.r1'
FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $2 $0 0x40A
System::Call 'USER32::GetWindowRect(ir2,ir1)'
System::Call 'USER32::MapWindowPoints(i0,ir0,ir1,i1)'
System::Call '*$1(i.r6,i.r7)'
System::Call 'USER32::GetClientRect(ir2,ir1)'
System::Call '*$1(i,i,i.r8,i.r9)'
IntOp $9 $9 + 3 ;padding
IntOp $7 $7 - $9
GetDlgItem $2 $0 0x3EE
System::Call 'USER32::GetClientRect(ir2,ir1)'
System::Call '*$1(i,i,i.r3,i.r4)'
System::Free $1
IntOp $4 $4 - $9 ;reduce size of label
System::Call 'USER32::SetWindowPos(ir2,i,i,i,ir3,ir4,i6)'
System::Call 'USER32::CreateWindowEx(i0,t "Button",t "Let Setup modify your browser settings",i ${__NSD_CheckBox_STYLE},ir6,ir7,ir8,ir9,ir0,i666,i0,i0)i.r2'
SendMessage $0 ${WM_GETFONT} 0 0 $0
SendMessage $2 ${WM_SETFONT} $0 1
${If} $Revisit == "false" ; If its Visited for first time
${NSD_SetState} $2 1 ;check it]
${Else} ; If user clicked back button on directory page
${NSD_SetState} $2 $checkboxstate
${endIf}
/* to Reposition the checkbox */
FindWindow $R0 `#32770` `` $HWNDPARENT
GetDlgItem $R0 $R0 666
;ShowWindow $R0 ${SW_HIDE}
;nsResize::Set $R0 50 120 300 20
System::Call 'USER32::SetWindowPos(i, i, i, i, i, i, i) b ($R0, 0, 50, 210, 300, 20, 0)'
FindWindow $R0 `#32770` `` $HWNDPARENT
GetDlgItem $R0 $R0 1034
;ShowWindow $R0 ${SW_HIDE}
;nsResize::Set $R0 50 120 300 20
System::Call 'USER32::SetWindowPos(i, i, i, i, i, i, i) b ($R0, 0, 50, 150, 300, 20, 0)'
FindWindow $R0 `#32770` `` $HWNDPARENT
GetDlgItem $R0 $R0 1035
;ShowWindow $R0 ${SW_HIDE}
;nsResize::Set $R0 50 120 300 20
System::Call 'USER32::SetWindowPos(i, i, i, i, i, i, i) b ($R0, 0, 50, 170, 300, 20, 0)'
; Set transparent backgrounds.
FindWindow $mui.LicensePage "#32770" "" $HWNDPARENT
SetCtlColors $mui.LicensePage 0xFFFFFF transparent
!insertmacro SetTransparent $mui.LicensePage 1040
!insertmacro SetTransparent $mui.LicensePage 1000
;!insertmacro SetTransparent $mui.LicensePage 1006
!insertmacro SetTransparent $mui.LicensePage 1034
!insertmacro SetTransparent $mui.LicensePage 1035
!insertmacro SetTransparent $mui.LicensePage 666
; Refresh controls.
Call RefreshParentControls
GetDlgItem $0 $HWNDPARENT 1045
ShowWindow $0 ${SW_HIDE}
FunctionEnd