Modify

Opened 6 years ago

Closed 6 years ago

#2754 closed Bug (No Bug)

Bug in guiSetState( @SW_RESTORE, $gui ) ....

Reported by: JoeCool Owned by:
Milestone: Component: AutoIt
Version: 3.3.8.1 Severity: None
Keywords: Cc:

Description

I basicly just redefine Minize, Maximize, Restore and Close ... because in my application I will need to do some stuff in there ....

but here the problem, script start and display a hello world, if I minimize it, and click on the icon on the task bar( actually restoring it ) the restore works fine, window is at the right place...


but if I maximine the window and minimize it , the restore bring back a window NOT maximized !

if you comment out this line

guiSetOnEvent( $GUI_EVENT_RESTORE, "wndRestore" )


and let windoze do the restore a maximized window minimized in the task bar will be restore as a maximized window, so do you think ? ...

maybe there is a "bug" in the "guiSetState( @SW_RESTORE, $gui )" ...

#include <guiconstants.au3>
#include <constants.au3>

func wndMinimize()
   guiSetState( @SW_MINIMIZE, $gui )
endfunc

func wndMaximize()
   guiSetState( @SW_MAXIMIZE, $gui )
endfunc

func wndRestore()
   guiSetState( @SW_RESTORE, $gui )
endfunc

func wndClose()
  exit
endfunc

opt( "GUIOnEventMode", 1)

$flag = bitOr( $WS_SYSMENU, $WS_MINIMIZEBOX, $WS_SIZEBOX, $WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)
;$flag = 0
$gui = guiCreate( "Hello World", 200, 200, 200, 200, $flag )


guiSetOnEvent( $GUI_EVENT_MINIMIZE, "wndMinimize" )
guiSetOnEvent( $GUI_EVENT_MAXIMIZE, "wndMaximize" )

guiSetOnEvent( $GUI_EVENT_RESTORE, "wndRestore" )

guiSetOnEvent( $GUI_EVENT_CLOSE, "wndClose" )

guiSetState( @SW_SHOW )
while 1
   sleep( 1000 )
wend

Attachments (0)

Change History (1)

comment:1 Changed 6 years ago by Melba23

  • Resolution set to No Bug
  • Status changed from new to closed

No bug - just use

Opt("GUIEventOptions", 1)

to prevent the default Windows code running as well as your own.

M23

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 ticket will remain with no owner.
Author


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

 
Note: See TracTickets for help on using tickets.