How to achieve window shadows?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
arcticir
Posts: 694
Joined: 17 Nov 2013, 11:32

How to achieve window shadows?

16 Sep 2018, 02:38

How to achieve such a shadow effect? This is the shadow effect of the icons in the WIN10 file manager.

Image

I searched for two methods in the forum, but they are all invalid:
Image

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

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: AlFlo and 216 guests