Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <GUIConstants.au3>
- #include <WinAPI.au3>
- #include <WindowsConstants.au3>
- $hWnd = GUICreate("Move Test", 200, 100)
- $cLabel_X = GUICtrlCreateLabel("", 10, 10, 90, 20)
- $cLabel_Y = GUICtrlCreateLabel("", 100, 10, 90, 20)
- GUISetState()
- GUIRegisterMsg($WM_MOVE, "_WM_MOVE")
- While GUIGetMsg() <> -3
- WEnd
- Func _WM_MOVE($hWnd, $Msg, $wParam, $lParam)
- Local $iX = _WinAPI_LoWord($lParam)
- Local $iY = _WinAPI_HiWord($lParam)
- GUICtrlSetData($cLabel_X, $iX)
- GUICtrlSetData($cLabel_Y, $iY)
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement