最新消息:

清理托盘图标

nsis 永恒心锁 946浏览 0评论
!include WinMessages.nsh
!include "${NSISDIR}\Examples\System\System.nsh"
Call RefreshSysTray

Function RefreshSysTray

 FindWindow $0 "Shell_TrayWnd" ""
 FindWindow $0 "TrayNotifyWnd" "" $0
 FindWindow $0 "SysPager" "" $0
 FindWindow $0 "ToolbarWindow32" "" $0
 System::Call "*${stRECT} .r1"
 System::Call "User32::GetWindowRect(i, i) i (i r0, r1) .r2"
 System::Call "*$1${stRECT} (.r2, .r3, .r4, .r5)"
 System::Free $1
 IntOp $2 $4 - $2
 IntOp $3 $5 - $3
 System::Call 'User32::GetSystemMetrics(i 49) i .r4'
 System::Call 'User32::GetSystemMetrics(i 50) i .r5'
 IntOp $7 $4 / 2
 IntOp $7 $3 - $7
 LoopY:
 IntOp $6 $5 / 2
 IntOp $6 $2 - $6
 LoopX:
 SendMessage $0 ${WM_MOUSEMOVE} 0 "$6 | $7"
 IntOp $6 $6 - $4
 IntCmp $6 0 EndLoopX EndLoopX LoopX
 EndLoopX:
 IntOp $7 $7 - $5
 IntCmp $7 0 EndLoopY EndLoopY LoopY
 EndLoopY:
FunctionEnd
永恒心锁,版权所有丨如未注明,均为转载丨本网站采用BY-NC-SA协议进行授权

转载请注明:永恒心锁-分享互联网 » 清理托盘图标

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