Modify

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#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 Changed 11 years ago by Jon

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 Changed 11 years ago by Valik

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

comment:3 Changed 11 years ago by Jon

  • Owner set to Jon
  • Status changed from new to accepted

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 Changed 11 years ago by Jon

  • Milestone set to 3.2.11.13
  • Resolution set to Fixed
  • Status changed from accepted to closed

Fixed in version: 3.2.11.13

comment:5 Changed 11 years ago by Valik

  • Milestone changed from 3.2.11.13 to 3.2.13.0

Fixing wrong milestone.

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.

Add Comment

Modify Ticket

Action
as closed The owner will remain Jon.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.