An example for BgImage.dll
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1708 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
b2692158de
commit
59f4f257d0
1 changed files with 31 additions and 0 deletions
31
Contrib/BgImage/Example.nsi
Normal file
31
Contrib/BgImage/Example.nsi
Normal file
|
@ -0,0 +1,31 @@
|
|||
Name "BgImage.dll test"
|
||||
|
||||
OutFile "BgImage Test.exe"
|
||||
|
||||
XPStyle on
|
||||
|
||||
Section
|
||||
BgImage::Init /NOUNLOAD /FILLSCREEN "${NSISDIR}\Contrib\Icons\modern.bmp"
|
||||
|
||||
MessageBox MB_OK "Next image?"
|
||||
|
||||
BgImage::SetImage /NOUNLOAD /FILLSCREEN "${NSISDIR}\Contrib\Icons\checks1.bmp"
|
||||
|
||||
FindFirst $0 $1 $WINDIR\Media\*.wav
|
||||
StrCmp $0 "" skipSound
|
||||
moreSounds:
|
||||
StrCmp $1 "" noMoreSounds
|
||||
BgImage::Sound /NOUNLOAD $WINDIR\Media\$1
|
||||
# the sound is played asynchoronsly so NSIS can keep working while it plays
|
||||
# we don't want the message box to appear while playing so we give it a little time to play alone
|
||||
Sleep 500
|
||||
MessageBox MB_YESNO "Another sound?" IDNO noMoreSounds
|
||||
FindNext $0 $1
|
||||
Goto moreSounds
|
||||
|
||||
noMoreSounds:
|
||||
FindClose $0
|
||||
skipSound:
|
||||
|
||||
BgImage::Destroy
|
||||
SectionEnd
|
Loading…
Add table
Add a link
Reference in a new issue