here is the code, notepad is disappeared to backgroud
Code: Select all
hC := WinExist("ahk_class Notepad")
hH := WinExist("ahk_class Chrome_WidgetWin_1")
hH := WinExist("ahk_class MozillaWindowClass")
WinActivate, ahk_class Notepad
WinSet, Style, % -(WS_POPUP|WS_CAPTION|WS_THICKFRAME)
WinSet, Style, +%WS_CHILD%
WinSet, ExStyle, -%WS_EX_CLIENTEDGE%
hwndNew := DllCall("SetParent", "Ptr", hC, "Ptr", hH)
msgbox,SetParent(%hC%, %hH%) = %hwndNew%