Opened on Aug 25, 2008 at 5:33:32 PM
Closed on Aug 25, 2008 at 6:50:16 PM
Last modified on Aug 25, 2008 at 10:14:22 PM
#537 closed Bug (No Bug)
Strange behaviour while using wrong GUI parameter
| Reported by: | Xenobiologist | Owned by: | |
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | 3.2.12.0 | Severity: | None |
| Keywords: | Cc: |
Description
Hi,
I tested this script and my Windows hung up after I clicked the trayicon and closed the script in Scite.
Sometimes the edit pane is visible, sometimes not. If it is, the behaviour described above happens. I know this is not a "bug", cause I assume that I do use the GuiCreate Func wrong, but I nevertheless wanted to share the info.
#include <EditConstants.au3>
#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
$n_studi_gui = GUICreate("Nach Studienzeit", 950, 720, @DesktopWidth / 2 - 475, @DesktopHeight / 2 - 360, $WS_border, Default)
GUICtrlCreatePic(@ScriptDir & "\Bilder\Nach.jpg", -1, -1, 950, 720, $ws_disabled)
$n_studi_zurueck = GUICtrlCreateButton("zurück", 800, 600, 140, 80, 0)
$n_studi_button1 = GUICtrlCreateButton("Tätigkeiten", 50, 25, 175, 50)
$n_studi_button2 = GUICtrlCreateButton("Verdienst", 50, 75, 175, 50)
$n_studi_button3 = GUICtrlCreateButton("Weiterbildungsmöglichkeiten", 50, 125, 175, 50)
$edit = GUICreate(400, 10, 500, 400, $WS_POPUP, Default, $n_studi_gui)
$n_studi_edit = GUICtrlCreateEdit('', 500, 10, 400, 500, Default);BitOR($WS_HSCROLL, $WS_VSCROLL, $ES_READONLY))
GUICtrlSetFont(-1, 10, "", "", "Comicsan MS")
GUISetState(@SW_SHOW, $n_studi_gui)
GUISetState(@SW_SHOW, $edit)
While 1
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd
GUIDelete()
Mega
Attachments (0)
Change History (3)
comment:1 by , on Aug 25, 2008 at 6:50:16 PM
| Resolution: | → No Bug |
|---|---|
| Status: | new → closed |
comment:2 by , on Aug 25, 2008 at 8:51:10 PM
Yes, but why does Windows hang after passing a handle as style?
comment:3 by , on Aug 25, 2008 at 10:14:22 PM
Does it matter? It's bad input and bad things happen. I'm not interested in debugging why Windows behaves the way it does with garbage input like that.

It's not strange. You're passing an HWND as the extended style. Since the HWND changes from run to run, you pass a different value every time. Since the extended style is just bitwise flags, you're passing a different combination each time. That's why the results are unpredictable.