Modify

Opened 18 years ago

Closed 18 years ago

#178 closed Bug (Fixed)

GUIRegisterMsg: change of behaviour in WM_NCHITTEST message handler

Reported by: rover Owned by: J-Paul Mesnage
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 by Valik, 18 years ago

Assuming that GUIRegisterMsg()'s return value is as broken as I think it is, then yes.

comment:2 by J-Paul Mesnage, 18 years ago

Milestone: 3.2.11.6
Owner: set to J-Paul Mesnage
Resolution: Fixed
Status: newclosed

Fixed in version: 3.2.11.6

Modify Ticket

Action
as closed The owner will remain J-Paul Mesnage.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.