Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#251 closed Bug (Fixed)

GUIRegisterMsg return bug regression

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


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 and bugs in (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>

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

GUIRegisterMsg($WM_SIZE, 'WM_SIZE')


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

Func Test()
	Return 1

Attachments (0)

Change History (5)

comment:1 Changed 16 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 16 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 16 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 16 years ago by Jon

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

Fixed in version:

comment:5 Changed 16 years ago by Valik

  • Milestone changed from to

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

as closed The owner will remain Jon.

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

Note: See TracTickets for help on using tickets.