最新消息:

幻灯片WebCtrl的使用例子

nsis 永恒心锁 1687浏览 0评论
!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
永恒心锁,版权所有丨如未注明,均为转载丨本网站采用BY-NC-SA协议进行授权

转载请注明:永恒心锁-分享互联网 » 幻灯片WebCtrl的使用例子

您必须 登录 才能发表评论!