I don't see anything wrong in this code but the result is not what I expect. I am doing something wrong?
#include <WinAPI.au3>
Global $GUI = GUICreate("Example")
GUISetState(@SW_SHOW,$GUI)
While True
If GUIGetMsg() = -3 Then Exit
Check()
Sleep(10)
WEnd
Func Check()
Local $rect = _WinAPI_GetWindowRect($GUI)
Local $point = DllStructCreate($tagPOINT)
DllStructSetData($point,"X",MouseGetPos(0))
DllStructSetData($point,"Y",MouseGetPos(1))
$result = _WinAPI_PtInRect($rect,$point)
TrayTip("","Mouse over GUI: " & $result,1)
EndFunc