清理托盘图标

!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
© 版权声明
THE END
喜欢就支持一下吧
点赞7 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容