;利用nsdialogs在页面中创建ico与bmp图片
;需要替换nsdialogs.nsh文件
!AddIncludeDir .
!include nsDialogs.nsh
Name nsDialogs
OutFile nsDialogs.exe
XPStyle on
Page custom nsDialogsImage
Page instfiles
;定义需要的变量
Var Dialog
Var Image
Var hImage
Var Icon
Var hIcon
Function .onInit
InitPluginsDir
File /oname=$PLUGINSDIRimage.bmp "${NSISDIR}ContribGraphicsHeadernsis-r.bmp"
File /oname=$PLUGINSDIRicon.ico "${NSISDIR}ContribGraphicsIconsarrow2-install.ico"
FunctionEnd
Function nsDialogsImage
nsDialogs::Create /NOUNLOAD 1018
Pop $Dialog
${If} $Dialog == error
Abort
${EndIf}
;插件图标
${NSD_CreateIcon} 0 100 100% 100% ""
Pop $Icon
${NSD_SetIcon} $Icon $PLUGINSDIRicon.ico $hIcon
;创建bmp位图
${NSD_CreateBitmap} 0 0 100% 100% ""
Pop $Image
${NSD_SetImage} $Image $PLUGINSDIRimage.bmp $hImage
nsDialogs::Show
;释放句柄
${NSD_FreeImage} $hIcon
${NSD_FreeImage} $hImage
FunctionEnd
Section
SectionEnd
© 版权声明
THE END
暂无评论内容