最新消息:

使用Sendmessage的简单例子

nsis 永恒心锁 1791浏览 0评论
;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
永恒心锁,版权所有丨如未注明,均为转载丨本网站采用BY-NC-SA协议进行授权

转载请注明:永恒心锁-分享互联网 » 使用Sendmessage的简单例子

您必须 登录 才能发表评论!