正式会员享受无限制浏览网站功能和高速网盘下载,赶快加入本站吧!
您需要 登录 才可以下载或查看,没有账号?立即注册
x
执行安装程序,首先弹出一个对话框,内容为“请问是否需要播放音乐”,有“确定”和“取消”两个选项,点击“确定”,播放音乐,出现欢迎页面,执行后续安装。
反之,不播放音乐,出现欢迎页面,执行后续安装。
- [Files]
- Source: music.mp3; DestDir: "{tmp}"; Flags: dontcopy
- [Code]
- Function mciSendString(lpszCommand: String; lpszReturnString: Integer; cchReturnLength: Integer; hwndCallback: Integer): Integer;
- external 'mciSendStringA@winmm.dll stdcall';
- procedure InitializeWizard();
- var
- BGMusicFile, SplashFile: string;
- SplashForm: TForm;
- SplashFileName: String;
- I: Integer;
- if MsgBox('你想要播放音乐吗?', mbConfirmation, MB_YESNO) = IDYES then
- begin
- ExtractTemporaryFile(ExtractFileName(ExpandConstant('{tmp}\music.mp3')));
- SplashForm := TForm.create(nil);
- with SplashForm do
- begin
- mciSendString(ExpandConstant('play {tmp}\music.mp3'),0,0,0);
- Close;
- Free;
- end;
- end;
复制代码 |