I searched for two methods in the forum, but they are all invalid:
Code: Select all
gui:=GuiCreate("+E0x200")
gui.show("w" 122 " h" 122)
FrameShadow(gui.hwnd)
Return
FrameShadow(HGui) {
DllCall("dwmapi\DwmIsCompositionEnabled","IntP",_ISENABLED) ; Get if DWM Manager is Enabled
if _ISENABLED ; if DWM is not enabled, Make Basic Shadow
DllCall("SetClassLong","UInt",HGui,"Int",-26,"Int",DllCall("GetClassLong","UInt",HGui,"Int",-26)|0x20000)
else {
VarSetCapacity(_MARGINS,16)
NumPut(1,&_MARGINS,0,"UInt")
NumPut(1,&_MARGINS,4,"UInt")
NumPut(1,&_MARGINS,8,"UInt")
NumPut(1,&_MARGINS,12,"UInt")
DllCall("dwmapi\DwmSetWindowAttribute", "Ptr", HGui, "UInt", 2, "Int*", 2, "UInt", 4)
DllCall("dwmapi\DwmExtendFrameIntoClientArea", "Ptr", HGui, "Ptr", &_MARGINS)
}
}
WIN10 64 - ahk H2 32