![](/img/trans.png)
[英]Can you add a button inside a custom TableCell in material UI?
[英]Can't find IDOK (1) in the custom UI! How to add a custom OK Button in NSIS?
請幫忙 ! 在NSIS中,我正在使用
!define MUI_PAGE_CUSTOMFUNCTION_SHOW LicenseShow
然后
Function LicenseShow
; New dialog for custom items
nsDialogs::Create 1018
Pop $0
; Accept button
${NSD_CreateButton} 373, 223, 50, 14 "Accept" ; Can't find IDOK (1) in the custom UI!
; Decline button
${NSD_CreateButton} 21, 223, 50, 14 "Decline"
; Picture
${NSD_CreateBitmap} 5 5 100% 100 "disclosure.bmp"
Pop $0
${NSD_SetImage} $0 $PLUGINSDIR\image.bmp $ImageHandle
; Disclaimer
nsDialogs::CreateControl /NOUNLOAD ${__NSD_Text_CLASS} ${DEFAULT_STYLES}|${WS_TABSTOP}|${ES_WANTRETURN}|${ES_MULTILINE} ${__NSD_Text_EXSTYLE} 5 220 660 115 ''
Pop $1
SendMessage $1 ${EM_SETREADONLY} 1 0
SetCtlColors $1 0x000000 0xFFFFFF
${NSD_SetText} $1 "The license text"
nsDialogs::Show
${NSD_FreeImage} $ImageHandle
FunctionEnd
如何確定“接受”按鈕上有IDOK?
請幫忙。
您可以通過調用System::Call 'user32::SetWindowLong(i $myhwnd,i -12,i $mynewid)'
來設置ID,但是您真正應該做的是設置回調函數:
...
${NSD_CreateButton} ...
pop $0
${NSD_OnClick} $0 userclicked
...
Function userclicked
MessageBox mb_ok Hello
SendMessage $hwndparent ${WM_COMMAND} 1 0
FunctionEnd
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.