幻灯片WebCtrl的使用例子

!AddPluginDir .
!include MUI2.nsh
Name WebCtrl
Caption WebCtrl
OutFile WebCtrl.exe
InstallDir $TEMP
ShowInstDetails NeverShow
RequestExecutionLevel admin
!insertmacro MUI_PAGE_DIRECTORY
!define MUI_PAGE_CUSTOMFUNCTION_PRE ExtractFiles
!define MUI_PAGE_CUSTOMFUNCTION_SHOW CreateStaticRect
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE SimpChinese
Section -Main
 DetailPrint "正在安装,请稍等。"
 Sleep 1000
 Sleep 1000
 Sleep 1000
 Sleep 1000
 Sleep 1000
 Sleep 1000
 Sleep 1000
 Sleep 1000
 Sleep 1000
 Sleep 1000
 Sleep 1000
 Sleep 1000
 Sleep 1000
 Sleep 1000
 Sleep 1000
 Sleep 1000
 Sleep 1000
 Sleep 1000
 Sleep 1000
 Sleep 1000
 Sleep 1000
 Sleep 1000
 Sleep 1000
 Sleep 1000
 Sleep 1000
SectionEnd
Function ExtractFiles
 InitPluginsDir
 File /oname=$PLUGINSDIRToggleImages.html ToggleImages.html
 File /oname=$PLUGINSDIR450x190_01.png 450x190_01.png
 File /oname=$PLUGINSDIR450x190_02.png 450x190_02.png
 File /oname=$PLUGINSDIR450x190_03.png 450x190_03.png
 File /oname=$PLUGINSDIR450x190_04.png 450x190_04.png
 File /oname=$PLUGINSDIR450x190_05.png 450x190_05.png
FunctionEnd
Function CreateStaticRect
 System::Call `*(i,i,i,i)i(0,24,300,116).R0`
 System::Call `user32::MapDialogRect(i$HWNDPARENT,iR0)`
 System::Call `*$R0(i.s,i.s,i.s,i.s)`
 System::Free $R0
 FindWindow $R0 "#32770" "" $HWNDPARENT
 System::Call `user32::CreateWindowEx(i,t"STATIC",in,i${DEFAULT_STYLES}|${SS_BLACKRECT},is,is,is,is,iR0,i1100,in,in)i.R0`
 # 轮换图片效果由 HTML 所实现,此处仅适用插件来显示网页。
 WebCtrl::ShowWebInCtrl $R0 "$PLUGINSDIR/ToggleImages.html"
FunctionEnd
THE END
喜欢就支持一下吧
点赞10 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容