【窗口置底】使用ahk脚本使任意窗口嵌入桌面

尝试用 AutoHotkey v2 写了一下代码~

!F1:: func_WinAlwaysBottom(WinExist("A"), 1) ; Alt + F1:启用窗口置底(嵌入桌面)
!F2:: func_WinAlwaysBottom(WinExist("A"), 0) ; Alt + F2:禁用窗口置底(嵌入桌面)
func_WinAlwaysBottom(Child_ID, DoOrUndo) {
	If DoOrUndo = 1 { ; 启用窗口置底(嵌入桌面)
		Desktop_ID := WinGetID("ahk_exe explorer.exe ahk_class WorkerW")
		Return DllCall("SetParent", "uint", Child_ID, "uint", Desktop_ID)
	} Else If DoOrUndo = 0 { ; 禁用窗口置底(嵌入桌面)
		Return DllCall("User32\SetParent", "Ptr", Child_ID, "Ptr", 0)
	}
}