Local $iWidth = 400, $iHeight = 300, $iX = @DesktopWidth - $iWidth, $iY = 0
GUICreate("Test", $iWidth, $iHeight, $iX, $iY)
GUISetState()
GUIRegisterMsg(0x216, "WM_MOVING")
While GUIGetMsg() <> -3
WEnd
Func WM_MOVING($hWnd, $iMsg, $iwParam, $ilParam)
Local $tRect = DllStructCreate("dword[4]", $ilParam)
DllStructSetData($tRect, 1, $iX, 1)
DllStructSetData($tRect, 1, $iY, 2)
DllStructSetData($tRect, 1, $iX + $iWidth, 3)
DllStructSetData($tRect, 1, $iY + $iHeight, 4)
Return 1
EndFunc ;==>WM_MOVING
截取WM_MOVING消息,参考WM_MOVING Message。 |