Code: Select all
DllCall("User32.dll\SetParent", "Ptr", GuiHwnd, "Ptr", 0)
I guess this demonstrates the issue:
Code: Select all
#SingleInstance, Force
Gui, Show, w300 h300
Gui, +hwndGuiHwnd +E0x80000
Gui, Color, Red
Return
F1::
DllCall("User32.dll\SetParent", "Ptr", GuiHwnd, "Ptr", WinExist("A"))
Return
F2::
DllCall("User32.dll\SetParent", "Ptr", GuiHwnd, "Ptr", 0)
Return