Modify

Opened 12 years ago

Closed 12 years ago

#2471 closed Bug (Fixed)

Bad restore for script using $WS_EX_LAYOUTRTL

Reported by: J-Paul Mesnage 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 by mlipok, 12 years ago

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 by Jon, 12 years ago

Milestone: 3.3.13.2
Owner: set to Jon
Resolution: Fixed
Status: newclosed

Fixed by revision [10299] in version: 3.3.13.2

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.