Modify

#251 closed Bug (Fixed)

GUIRegisterMsg return bug regression

Reported by: Saunders <admin@…> Owned by: Jon
Milestone: 3.2.13.0 Component: AutoIt
Version: 3.2.11.12 Severity: None
Keywords: GUIRegisterMsg return regression Cc:

Description

The example script should be enough, but just to be clear, it appears that a function that returns inside a function that's been registered (via GUIRegisterMsg) makes the registered function ignore the internal message handler. A simple workaround is to Return $GUI_RUNDEFMSG regardless, but it worked fine back in 3.2.11.5 and bugs in 3.2.11.9 (I don't have any versions in between for testing, sorry), I'm putting down the latest version simply because the bug is still present. This may be a duplicate of #222, but I'm not sure.

#include <GUIConstants.au3>
#include <WindowsConstants.au3>

Opt('GUIResizeMode', $GUI_DOCKBORDERS)
$gui = GUICreate(@AutoItVersion, 200, 200, Default, Default, $WS_OVERLAPPEDWINDOW)
GUICtrlCreateEdit('Control should size with window... but it does not.', 0, 0, 200, 200)
GUISetState()

GUIRegisterMsg($WM_SIZE, 'WM_SIZE')

Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE


Func WM_SIZE()
	Test()
	;~ Return $GUI_RUNDEFMSG ; Should not be required, but if you uncomment everything works fine.
EndFunc

Func Test()
	Return 1
EndFunc

Attachments (0)

Change History (5)

comment:1 by Jon, on May 9, 2008 at 9:54:15 AM

JP, maybe we should go back to the original version of this code. All the fixes we've done have just made things worse?

comment:2 by Valik, on May 9, 2008 at 4:46:30 PM

Define "worse". It's all been wrong and will always be wrong until the entire Return mechanic is re-written.

comment:3 by Jon, on May 11, 2008 at 5:23:43 PM

Owner: set to Jon
Status: newaccepted

Rewritten this code in a test version. Just checking if it fixes all the bugs and if it's worth the risk of including it in the release at this stage.

comment:4 by Jon, on May 11, 2008 at 8:33:48 PM

Milestone: 3.2.11.13
Resolution: Fixed
Status: acceptedclosed

Fixed in version: 3.2.11.13

comment:5 by Valik, on Oct 30, 2008 at 3:07:23 AM

Milestone: 3.2.11.133.2.13.0

Fixing wrong milestone.

Modify Ticket

Action
as closed The owner will remain Jon.

Add Comment


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