TrayCreateItem制作的菜单,点一次前面就会有个对号,怎么取消?
本帖最后由 zb7512511 于 2010-12-26 22:10 编辑TrayCreateItem制作的菜单,点一次前面就会有个对号,怎么取消?
问题刚刚看到别人也有问的,并解决了。
Opt("TrayMenuMode",3) #Include <Constants.au3>
#NoTrayIcon
Opt("TrayMenuMode",1)
$test = TrayCreateItem("Test")
$exititem=TrayCreateItem("Exit")
TraySetState()
While 1
$msg = TrayGetMsg()
Select
Case $msg = 0
ContinueLoop
Case $msg=$test
If BitAND(TrayItemGetState($test),$TRAY_CHECKED) Then
TrayItemSetState($test,BitOr($TRAY_UNCHECKED,TrayItemGetState($test)))
Else
TrayItemSetState($test,BitOr($TRAY_CHECKED,TrayItemGetState($test)))
EndIf
Case $msg = $exititem
ExitLoop
EndSelect
WEnd
页:
[1]