Shadow effect
How can put shadow effect on the four sides of the window?
6 posts
Name "Test Shadow"
OutFile "Test_Shadow_setup.exe"
InstallDir "$TEMP\Test Shadow"
!include "MUI.nsh"
!include "WinCore.nsh"
!include "nsDialogs.nsh"
!include "FileFunc.nsh"
!include "LogicLib.nsh"
!include "WinMessages.nsh"
SetCompressor lzma
RequestExecutionLevel user
ShowInstDetails show
ShowUninstDetails show
BrandingText /TRIMRIGHT " "
!define MUI_CUSTOMFUNCTION_GUIINIT "onGuiInit"
Page custom "nsDialogsPage" ""
Page instfiles
!insertmacro MUI_LANGUAGE "ENGLISH"
Var DROPSHADOW
!ifndef SPI_GETDROPSHADOW
!define SPI_GETDROPSHADOW 0x1024
!endif
!ifndef SPI_SETDROPSHADOW
!define SPI_SETDROPSHADOW 0x1025
!endif
Function ".onInit"
System::Call "user32::SystemParametersInfo(i${SPI_GETDROPSHADOW},i0,*i.s,i0)"
Pop $DROPSHADOW
System::Call "user32::SystemParametersInfo(i${SPI_SETDROPSHADOW},i0,i1,i0)"
System::Call "user32::SystemParametersInfo(i${SPI_SETDROPSHADOW},i0,i1,i0)"
FunctionEnd
Function onGuiInit
System::Call 'user32::GetClassLong(i,i) i ($HWNDPARENT,-26) .s'
Pop $R0
System::Call 'user32::SetClassLong(i,i,i) i ($HWNDPARENT,-26,$R0|0x20000) .s'
Pop $R0
FunctionEnd
var Welcome
Function nsDialogsPage
nsDialogs::Create 1018
Pop $0
${If} $0 == error
Abort
${EndIf}
${NSD_CreateLabel} 90u 60u 93% 25u "WELCOME!"
Pop $Welcome
CreateFont $0 "Calibri Light" "20" "800"
SendMessage $Welcome ${WM_SETFONT} $0 0
nsDialogs::Show
FunctionEnd
Section "" Main
SectionEnd
Function ".onGUIEnd"
System::Call "user32::SystemParametersInfo(i${SPI_SETDROPSHADOW},i0,i$DROPSHADOW,i0)"
FunctionEnd