Calistoga Posted June 17, 2008 Share Posted June 17, 2008 (edited) Hi, I have a problem with creating child windows for a main gui. It worked just fine on the stable release afaik. I have not checked the latest beta (3.2.13.2) yet, but according to the change log, nothing like this have been changed as far as I can see. More information commented in the code. Does this work for you? Am I doing anything obviously wrong? I apologize if this has been reported from before (and is fixed). EDIT: Fixed a typing mistake in the example code. Problem does still exist. EDIT2: Fixed in 3.2.13.1 Beta and higher. expandcollapse popup#cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.13.0 (beta) Author: Encoded Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; The main GUI opens just fine. When you press the Exit button, the program quits as it should. However, when clicking the ChildWindow button, ; the program freezes, and so does the exit button. The child window does not appear at all. Is this a bug with AutoIt 3.2.13.0 Beta? ; Everything works just fine without the extra child window code. ; This worked fine on the stable release. #NoTrayIcon #include <GUIConstants.au3> #include <WindowsConstants.au3> $aAppName = "Bug: ChildWindow" $aParentWindow = GUICreate($aAppName, 200, 90, -1, -1) $Button_Test = GUICtrlCreateButton($aAppName, 10, 10, 180, 30) $Button_Exit = GUICtrlCreateButton("Exit", 10, 50, 180, 30) GUICtrlSetState(-1, $GUI_DEFBUTTON) GUISetState(@SW_SHOW) While 1 Dim $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button_Exit Exit Case $Button_Test $ChildWindow = GUICreate("ChildWindow", 300, 200, -1, -1, BitOR($WS_CAPTION, $WS_SYSMENU), $WS_EX_MDICHILD, $aParentWindow) ; GUICreate("ChildWindow", 300, 200, -1, -1, BitOR($WS_CAPTION, $WS_SYSMENU), -1, $aParentWindow) <-- I have tried this way ; GUICreate("ChildWindow", 300, 200, -1, -1, -1, $WS_EX_MDICHILD, $aParentWindow) <-- And this way $CloseChildButton = GUICtrlCreateButton("Close", 10, 160, 280, 30) GUISetState(@SW_SHOW) While 1 Dim $cMsg = GUIGetMsg() Select Case $cMsg = $GUI_EVENT_CLOSE GUISetState(@SW_ENABLE, $aAppName) GUIDelete($ChildWindow) ExitLoop Case $cMsg = $CloseChildButton GUISetState(@SW_ENABLE, $aAppName) GUIDelete($ChildWindow) ExitLoop EndSelect WEnd EndSwitch WEnd Edited June 18, 2008 by Encoded Link to comment Share on other sites More sharing options...
ResNullius Posted June 17, 2008 Share Posted June 17, 2008 (edited) $ChildWindow = GUICreate("ChildWindow", 300, 200, -1, -1,BitOR($WS_CAPTION, $WS_SYSMENU),$WS_EX_MDICHILD, $aParentWindow)Edit: added back original $WS styles Edited June 17, 2008 by ResNullius Link to comment Share on other sites More sharing options...
Calistoga Posted June 17, 2008 Author Share Posted June 17, 2008 (edited) Thank you for correcting that ResNullius. I wrote the example code to demonstrate this issue, which unfortunately remains the same. Several scripts i wrote on the stable release did work with the script posted above (not with the error you found of course). They do not work on the beta release. Can anyone check if they have the same problem or if there are more errors in my example code? Edited June 17, 2008 by Encoded Link to comment Share on other sites More sharing options...
-Ultima- Posted June 18, 2008 Share Posted June 18, 2008 (edited) 3.2.13.1 (10th June, 2008) (Beta)...- Fixed #355: Child not visible beta regression. (Thanks Ultima)Very much in the changelog. Edited June 18, 2008 by -Ultima- [ WinINet.au3 | Array.au3 (Optimized) | _UnixTimeParse() ] Link to comment Share on other sites More sharing options...
Calistoga Posted June 18, 2008 Author Share Posted June 18, 2008 Thank you Ultima, I didn't see that! Sorry for bothering you guys. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now