NSISVCLStyles是NSIS自定义界面UI第三方皮肤文件插件

/*
NSISVCLStyles是NSIS自定义界面UI第三方皮肤文件插件
NSISVCLStyles::LoadVCLStyle:用于加载皮肤文件,一般在初始化函数里调用.
NSISVCLStyles::RemoveStyleNCArea:将皮肤库只应用于客户端,挺实用的功能,对于自定义界面很适合.
NSISVCLStyles::RemoveStyleControl:将指定控件皮肤库风格去掉,这样可以自定义一些操作,增加了灵活性.
NSISVCLStyles源文件里收集了InnoSetup plugin版本,包括vsf皮肤文件的修改工具.
*/
!AddPluginDir "../Plugins"
!include "Logiclib.nsh"
!include "nsDialogs.nsh"
OutFile "example1.exe"
InstallDir $DESKTOPExample1
RequestExecutionLevel user
SetCompressor /SOLID lzma
XPStyle on
Page custom page1
Page components
Page directory
Page instfiles
Section "永恒心锁"
SectionEnd
Function .onInit
 InitPluginsDir
 ;Get the skin file to use
 File /oname=$PLUGINSDIRAmakrits.vsf "..Styleskhaki.vsf"
 ;Load the skin using the LoadVCLStyleA function
 NSISVCLStyles::LoadVCLStyle $PLUGINSDIRAmakrits.vsf
 #只应用于客户区域
 #NSISVCLStyles::RemoveStyleNCArea
FunctionEnd
Var Dialog
Var Label
Var Button1
Var Button2
Function page1
nsDialogs::Create 1018
Pop $Dialog
${If} $Dialog == error
Abort
${EndIf}
${NSD_CreateLabel} 10 2 80% 12u "Hello, welcome to nsDialogs!"
Pop $Label
#NSISVCLStyles::RemoveStyleControl $Label
${NSD_CreateButton} 0 30 200 50 "Type something here..."
Pop $Button1
#NSISVCLStyles::RemoveStyleControl $Button1
${NSD_CreateButton} 0 100 200 50 "Type something here..."
Pop $Button2
#指定控件不使用皮肤
NSISVCLStyles::RemoveStyleControl $Button2
nsDialogs::Show
FunctionEnd
Function .onUserAbort
 MessageBox MB_OK ".onUserAbort"
FunctionEnd
© 版权声明
THE END
喜欢就支持一下吧
点赞7 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容