使用Sendmessage的简单例子

;Sendmessage简单例子
;
!include "WinMessages.nsh"
!include "LogicLib.nsh"
name "Sendmessage简单例子"
outfile "test.exe"
page custom show leave
reservefile "pagecustom.ini"
section
sectionend
var HWND
function .oninit
initpluginsdir
setoutpath $pluginsdir
file "pagecustom.ini"
functionend
function show
installoptions::initdialog /nounload $pluginsdirpagecustom.ini
Pop $HWND
installoptions::show
functionend
function leave
ReadINIStr $0 "$pluginsdirpagecustom.ini" Settings State
ReadINIStr $3 "$pluginsdirpagecustom.ini" "Field 3" "HWND"
ReadINIStr $4 "$pluginsdirpagecustom.ini" "Field 4" "HWND"
ReadINIStr $5 "$pluginsdirpagecustom.ini" "Field 5" "HWND"
 ${Switch} $0
${Default}
Abort
 ${Case} 2 ;全选(001,002,003)
 SendMessage $3 ${BM_SETCHECK} 1 0
 SendMessage $4 ${BM_SETCHECK} 1 0
 SendMessage $5 ${BM_SETCHECK} 1 0
 Abort
 ${Case} 6 ;使001不可用
 EnableWindow $3 0
 Abort
 ${Case} 8 ;全否(001,002,003)
 SendMessage $3 ${BM_SETCHECK} 0 0
 SendMessage $4 ${BM_SETCHECK} 0 0
 SendMessage $5 ${BM_SETCHECK} 0 0
 Abort
 ${Case} 7 ;使001可用
 EnableWindow $3 1
 Abort
 ${Case} 0
${EndSwitch}
functionend
© 版权声明
THE END
喜欢就支持一下吧
点赞12 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容