Modify

Opened 11 years ago

Closed 10 years ago

#2471 closed Bug (Fixed)

Bad restore for script using $WS_EX_LAYOUTRTL

Reported by: Jpm Owned by: Jon
Milestone: 3.3.13.2 Component: AutoIt
Version: 3.3.8.1 Severity: None
Keywords: Cc:

Description

just use following script to repro

#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiEdit.au3>

Global $aPos[4] = [30, 20, 400, 400]

Local $hWnd = GUICreate("test " & @ScriptName, 800, 600, -1, -1, BitOR($GUI_SS_DEFAULT_GUI, $WS_MAXIMIZEBOX, $WS_SIZEBOX), $WS_EX_LAYOUTRTL)
;~ Local $hWnd = GUICreate("test " & @ScriptName, 800, 600, -1, -1, BitOR($GUI_SS_DEFAULT_GUI, $WS_MAXIMIZEBOX, $WS_SIZEBOX))

Local $Menu = GUICtrlCreateMenu("help")

Local $idGroup = GUICtrlCreateGroup("", 10, 100, 780, 470)
GUICtrlSetResizing($idGroup, $GUI_DOCKBORDERS)

;~ WinMove($hWnd, "", $aPos[0], $aPos[1], $aPos[2], $aPos[3])

Local $idEdit = GUICtrlCreateEdit("", 20, 120, 760, 440, BitAND($GUI_SS_DEFAULT_EDIT, BitNOT($ES_AUTOHSCROLL), BitNOT($WS_HSCROLL)))
GUICtrlSetResizing($idEdit, $GUI_DOCKBORDERS)

WinMove($hWnd, "", $aPos[0], $aPos[1], $aPos[2], $aPos[3])

Local $aTemp = WinGetClientSize($hWnd)
GUICtrlSetPos($idGroup, 10, 10, $aTemp[0] - 20, $aTemp[1] - 20)
GUICtrlSetPos($idEdit, 20, 30, $aTemp[0] - 40, $aTemp[1] - 50)

;~ Local $Menu = GUICtrlCreateMenu("help")

GUISetState(@SW_SHOW)
GUISetState(@SW_MINIMIZE)
GUISetState(@SW_RESTORE)

;~ Local $Menu = GUICtrlCreateMenu("help")

While True
	Switch GUIGetMsg()
		Case $GUI_EVENT_CLOSE
			ExitLoop
	EndSwitch
WEnd

Attachments (0)

Change History (2)

comment:1 Changed 11 years ago by mlipok

I once had a similar problem
Then go a little downplayed
Now let me show you a short answer to this problem by a slight modification of the example from Jpm

try to comment/uncomment one of the two "Local $Menu = GUICtrlCreateMenu("help")"

#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiEdit.au3>

Global $aPos[4] = [30, 20, 400, 400]

Local $hWnd = GUICreate("test " & @ScriptName, 800, 600, -1, -1, -1, $WS_EX_LAYOUTRTL)

Local $Menu = GUICtrlCreateMenu("help") ; do not work properly
Local $idGroup = GUICtrlCreateGroup("", 10, 100, 780, 470)
GUICtrlSetResizing($idGroup, $GUI_DOCKBORDERS)
;~ Local $Menu = GUICtrlCreateMenu("help") ; work properly

GUISetState(@SW_SHOW)
GUISetState(@SW_MINIMIZE)
GUISetState(@SW_RESTORE)

While True
	Switch GUIGetMsg()
		Case $GUI_EVENT_CLOSE
			ExitLoop
	EndSwitch
WEnd

comment:2 Changed 10 years ago by Jon

  • Milestone set to 3.3.13.2
  • Owner set to Jon
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed by revision [10299] in version: 3.3.13.2

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.