AttachToDesktop(HWND)
Function:
Code: Select all
; Attach the target window in front of the wallpaper and behind the desktop icons.
; Obviously, you can attach a normal window, a video player, a browser, etc.
; 使用 AttachToDesktop(目标窗口句柄) 可以将目标窗口贴在桌面上 图标下
; 显然 你可以贴普通窗口 贴视频播放器 贴浏览器等等
AttachToDesktop(hWindow)
{
SendMessage, 0x052C, 0, 0, , % "ahk_id " WinExist("ahk_class Progman")
WinGet, Matched, List, ahk_class WorkerW
loop, % Matched
{
; 有 SHELLDLL_DefView 的窗口是存图标的,没有的是存壁纸的
if (!DllCall("FindWindowEx", "Ptr", Matched%A_Index%, "Ptr", 0, "Str", "SHELLDLL_DefView", "UPtr", 0, "Ptr"))
hWorkerW := Matched%A_Index%
}
DllCall("SetParent", "Ptr", hWindow, "Ptr", hWorkerW, "Ptr")
}
Demo1 - GDIP Dynamic Wallpaper
This is a big GIF.
Demo2 - Nixie Clock
This is a GIF.
Download