#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 Changed 16 years ago by Valik
- Resolution set to No Bug
- Status changed from new to closed
comment:2 Changed 16 years ago by Xenobiologist
Yes, but why does Windows hang after passing a handle as style?
comment:3 Changed 16 years ago by Valik
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.
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.
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.