杉宫竹苑工作室

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 1898|回复: 0

Inno Setup 如何在安装时播放音乐循环播放

[复制链接]
发表于 2017-1-9 16:33:50 | 显示全部楼层 |阅读模式

正式会员享受无限制浏览网站功能和高速网盘下载,赶快加入本站吧!

您需要 登录 才可以下载或查看,没有账号?立即注册

x
  1. [Files]
  2. Source: "C:\music.mp3"; Flags: dontcopy

  3. [Code]
  4. function mciSendString(lpstrCommand, lpstrReturnString: AnsiString; uReturnLength, hWndCallback: Integer): Integer;
  5. external 'mciSendStringA@winmm.dll stdcall';

  6. //备注:上面的 mciSendString 函数也可以修改成这样(使用 Unicode 字符串):
  7. //function mciSendString(lpstrCommand, lpstrReturnString: String; uReturnLength, hWndCallback: Integer): Integer;
  8. //external 'mciSendStringW@winmm.dll stdcall';

  9. procedure InitializeWizard();
  10. var
  11.   s: string;
  12. begin
  13.     //ExtractTemporaryFile(ExtractFileName(ExpandConstant('{tmp}\music.mp3')));
  14.     ExtractTemporaryFile('music.mp3');
  15.     if FileExists(ExpandConstant('{tmp}\music.mp3')) then begin
  16.        mciSendString(ExpandConstant('OPEN {tmp}\music.mp3 TYPE MPEGVIDEO ALIAS BGMUSIC'),s,255,0);
  17.        mciSendString(ExpandConstant('PLAY BGMUSIC REPEAT'),s,255,0);
  18.     end;
  19. end;
复制代码


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|手机版|Archiver|SgzyStudio

GMT+8, 2024-5-19 07:59 , Processed in 0.106450 second(s), 22 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表