Hallo,
ich hab hier im Forum dieses Script gefunden:
Spoiler anzeigen
#include<WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
$hGUI = GUICreate("Test", 500, 500, -1, -1, BitOR($WS_MINIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU, $WS_CLIPCHILDREN))
GUISetOnEvent(-3, "_exit")
$hChildGUI = GUICreate("Test2", 300, 300, 10, 10, $WS_MAXIMIZEBOX + $WS_MINIMIZEBOX)
GUISetOnEvent(-3, "_closeChild")
$nExStyle = DllCall("user32.dll", "int", "GetWindowLong", "hwnd", $hChildGUI, "int", 0xEC)
DllCall("user32.dll", "int", "SetWindowLong", "hwnd", $hChildGUI, "int", 0xEC, "int", BitOR($nExStyle[0], $WS_EX_MDICHILD))
DllCall("user32.dll", "int", "SetParent", "hwnd", $hChildGUI, "hwnd", $hGUI)
GUISetState()
GUISetState(@SW_SHOW, $hGUI)
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]While 1
Sleep(100)
WEnd
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]Func _closeChild()
GUIDelete($hChildGUI)
EndFunc ;==>_closeChild
Func _exit()
Exit
EndFunc ;==>_exit
Das funktioniert zwar super, aber dabei lässt sich das Hauptfenster nicht schließen. Kann man das irgendwie ändern?