Global Const $tagRECT = 'int;int;int;int'
GUICreate('')
GUISetState()
GUIRegisterMsg(0x216, 'WM_MOVING')
While GUIGetMsg() + 3
ToolTip('')
WEnd
Func WM_MOVING($hWnd, $iMsg, $iwParam, $ilParam)
#forceref $hWnd, $iMsg, $iwParam
Local $tBuffer, $L, $T, $R, $B
$tBuffer = DllStructCreate($tagRECT, $ilParam)
$L = DllStructGetData($tBuffer, 1)
$T = DllStructGetData($tBuffer, 2)
$R = DllStructGetData($tBuffer, 3)
$B = DllStructGetData($tBuffer, 4)
ToolTip('当前窗口位置:X = ' & $L & ', Y = ' & $T & ', W = ' & $R - $L & ', H = ' & $B - $T)
$tBuffer = 0
EndFunc ;==>WM_MOVING
|