Opened 17 years ago
Closed 17 years ago
#178 closed Bug (Fixed)
GUIRegisterMsg: change of behaviour in WM_NCHITTEST message handler
Reported by: | rover | Owned by: | Jpm |
---|---|---|---|
Milestone: | 3.2.11.6 | Component: | AutoIt |
Version: | 3.2.11.1 | Severity: | |
Keywords: | beta, GUIRegisterMsg | Cc: |
Description
WM_NCHITTEST message handler for moving gui form
by client area with mouse not working in beta 3.2.11.1 and up
was working in 3.2.10.0
Is this related to Ticket #169?
tested on 2 machines running XP SP2 EN X86
AutoIt: prod. v3.2.10.0 beta v3.2.11.1 to v3.2.11.3
this alternative works - WM_NCLBUTTONDOWN
http://quadryders.com/phpcc/snippet.php?sid=46
http://www.autoitscript.com/forum/index.php?showtopic=63323
Is this usage now deprecated?
Global Const $WM_NCHITTEST = 0x0084
Global Const $HTCAPTION = 2, $HTCLIENT = 1
$hGui = GUICreate("Test", 300, 200, -1, -1)
GUIRegisterMsg($WM_NCHITTEST, "WM_NCHITTEST")
GUISetState()
Do
$msg = GUIGetMsg()
Until $msg = -3
Func WM_NCHITTEST($hWnd, $Msg, $wParam, $lParam)
If $hWnd = $hGUI And $Msg = $WM_NCHITTEST Then
Local $iProc = DllCall("user32.dll", "int", "DefWindowProc", _
"hwnd", $hWnd, "int", $Msg, "int", $wParam, "int", $lParam)
If @error Then Return SetError(@error, 0, 0)
$iProc = $iProc[0]
If $iProc = $HTCLIENT Then
Return $HTCAPTION
Else
Return $iProc
EndIf
EndIf
Return 'GUI_RUNDEFMSG'
EndFunc
; or
;Func WM_NCHITTEST($hWnd, $iMsg, $iwParam, $ilParam)
;If ($hWnd = $hGUI) And ($iMsg = $WM_NCHITTEST) Then Return $HTCAPTION
;EndFunc ;==>WM_NCHITTEST
Attachments (0)
Change History (2)
comment:1 Changed 17 years ago by Valik
comment:2 Changed 17 years ago by Jpm
- Milestone set to 3.2.11.6
- Owner set to Jpm
- Resolution set to Fixed
- Status changed from new to closed
Fixed in version: 3.2.11.6
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.
Assuming that GUIRegisterMsg()'s return value is as broken as I think it is, then yes.