代码中注释掉的语句,在窗口中加个透明的的子窗口,
用上此语句后父窗口的最小化和关闭事件不起作用.
那个大侠知道怎么解决吗?#include <GUIConstantsEx.au3>
#include <Debug.au3>
#Include <Date.au3>
#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
#include <Constants.au3>
Opt("TrayOnEventMode", 1)
Opt("GUIOnEventMode", 1)
Opt("TrayMenuMode", 1)
$hgui = GUICreate("测试", 300, 200, -1, -1)
GUISetState(@SW_SHOW)
;GUICreate("a", 2, 2, 10, 0, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD), $hgui)
GUISetState(@SW_SHOW)
GUISetOnEvent($GUI_EVENT_CLOSE, "gui")
GUISetOnEvent($GUI_EVENT_MINIMIZE, "gui")
TraySetOnEvent($TRAY_EVENT_PRIMARYDOUBLE, "TrayEvent")
While 1
Sleep(100)
WEnd
Func TrayEvent()
Switch @TRAY_ID
Case $TRAY_EVENT_PRIMARYDOUBLE
GUISetState(@SW_SHOWNORMAL)
EndSwitch
EndFunc ;==>TrayEvent
Func gui()
Switch @GUI_CtrlId
Case $GUI_EVENT_CLOSE
Exit
Case $GUI_EVENT_MINIMIZE
GUISetState(@SW_HIDE)
EndSwitch
EndFunc ;==>gui
|