Hello all! Recently I wanted to create settings window for my app, but if i want to close only child window, ะตhen all windows are closed.
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("fisrt", 385, 248, 192, 114)
$Button1 = GUICtrlCreateButton("settings", 40, 8, 97, 33)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
sett()
EndSwitch
WEnd
Func sett()
$settings_window = GUICreate("settings", 380, 100, 100, 114)
$exit_button = GUICtrlCreateButton("close", 34, 80, 9, 33)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
MsgBox (0, "exit", "exit")
Case $exit_button
Exit
EndSwitch
WEnd
EndFunc
Help please!