BgImage.DLL可以用来设置显示一张自定义的图片放在你安装窗口的后面,也可以在安装程序的过程中播放wav格式的音乐,你可以使用SetBg去设置背景,使用AddText去设置背景的文字,AddImage去设置背景的图片,你也可以添加多张图片,当你安装完成后不再需要背景图片或背景音乐的时候,要记得把它释放掉。这个插件支持2.42及以上的版本。
Name "BgImage.dll test"
OutFile "BgImage Test.exe"
XPStyle on
!define DEBUG
!macro GetReturnValue
!ifdef DEBUG
Pop $R9
StrCmp $R9 success +2
DetailPrint "Error: $R9"
!endif
!macroend
Function .onGUIInit
# the plugins dir is automatically deleted when the installer exits
InitPluginsDir
# lets extract some bitmaps...
File /oname=$PLUGINSDIR1.bmp "${NSISDIR}ContribGraphicsWizardllama.bmp"
File /oname=$PLUGINSDIR2.bmp "${NSISDIR}ContribGraphicsChecksmodern.bmp"
!ifdef DEBUG
# turn return values on if in debug mode
BgImage::SetReturn on
!endif
# set the initial background for images to be drawn on
# we will use a gradient from drak green to dark red
BgImage::SetBg /GRADIENT 0 0x80 0 0x80 0 0
!insertmacro GetReturnValue
# add an image @ (150,0)
BgImage::AddImage $PLUGINSDIR2.bmp 150 0
!insertmacro GetReturnValue
# add the same image only transparent (magenta wiped) @ (150,16)
BgImage::AddImage /TRANSPARENT 255 0 255 $PLUGINSDIR2.bmp 150 16
!insertmacro GetReturnValue
# create the font for the following text
CreateFont $R0 "Comic Sans MS" 50 700
# add a blue shadow for the text
BgImage::AddText "Testing 1... 2... 3..." $R0 0 0 255 48 48 798 198
!insertmacro GetReturnValue
# add a green shadow for the text
BgImage::AddText "Testing 1... 2... 3..." $R0 0 255 0 52 52 802 202
!insertmacro GetReturnValue
# add the text
BgImage::AddText "Testing 1... 2... 3..." $R0 255 0 0 50 50 800 200
!insertmacro GetReturnValue
# show our creation to the world!
BgImage::Redraw
# Refresh doesn't return any value
FunctionEnd
ShowInstDetails show
Section
# play some sounds
FindFirst $0 $1 $WINDIRMedia*.wav
StrCmp $0 "" skipSound
moreSounds:
StrCmp $1 "" noMoreSounds
BgImage::Sound /WAIT $WINDIRMedia$1
# Sound doesn't return any value either
MessageBox MB_YESNO "Another sound?" IDNO noMoreSounds
FindNext $0 $1
Goto moreSounds
noMoreSounds:
FindClose $0
skipSound:
# change the background image to Mike, tiled
BgImage::SetBg /TILED $PLUGINSDIR1.bmp
!insertmacro GetReturnValue
# we have to redraw to reflect the changes
BgImage::Redraw
MessageBox MB_OK "Mike the llama"
# clear everything
BgImage::Clear
# Clear doesn't return any value
# set another gradient
BgImage::SetBg /GRADIENT 0xFF 0xFA 0xBA 0xAA 0xA5 0x65
!insertmacro GetReturnValue
# add some text
BgImage::AddText "A Desert for Mike" $R0 0 0 0 50 50 800 150
!insertmacro GetReturnValue
# add mike as an image
BgImage::AddImage $PLUGINSDIR1.bmp 50 150
!insertmacro GetReturnValue
# again, we have to call redraw to reflect changes
BgImage::Redraw
SectionEnd
Function .onGUIEnd
BgImage::Destroy
# Destroy doesn't return any value
FunctionEnd
最近更新
淘宝微信支付怎么开通?9月5日淘宝公示与微信
人气排行
VisualStudio2017正式版下载地址分享。VisualStudio2017正式版已
UltraEdit简称UE编辑器,是很多码农朋友常用的一款编辑器,工作上
SublimeText3是一款非常好用的文本编辑器软件,用上sublimetext3
学习cad掌握cad快捷键命令是基础,下面为大家介绍2016cad快捷键命
刚刚发布的AutoCAD2015是Autodesk公司出品的CAD软件,借助AutoCA
现在随着CAXA电子图板的广泛普及,越来越多的企业选择CAXA电子图
相信SQLServer2008的朋友,有时候会遇到:用过通过端口1433连接到
SQL在企业中也是非常重要的应用,各种财务系统,ERP系统,OA系统
VS2010是一个集C++,VB,C#,等编程环境于一身的集成开发环境,功能
Mysql是一款功能强大的数据库软件,Mysql安装图文教程将介绍如何安