Inno Setup 5 插入音乐脚本代码是什么
发布网友
发布时间:2022-05-06 07:59
我来回答
共1个回答
热心网友
时间:2022-06-29 02:11
关于Inno Setup如何在安装时播放音乐
[Code]
Function mciSendString(lpszCommand: String; lpszReturnString: Integer; cchReturnLength: Integer; hwndCallback: Integer): Integer;
external 'mciSendStringA@winmm.dll stdcall';
procere InitializeWizard();
var
BGMusicFile, SplashFile: string;
SplashForm: TForm;
SplashFileName: String;
I: Integer;
begin
WizardForm.BORDERICONS := [biHelp, biSystemMenu, biMinimize];
ExtractTemporaryFile(ExtractFileName(ExpandConstant('{tmp}\爱的狂怒.mp3')));
SplashForm := TForm.create(nil);
with SplashForm do
begin
mciSendString(ExpandConstant('play {tmp}\爱的狂怒.mp3'),0,0,0);
Close;
Free;
end;
end;
[Files]
Source: "G:\音乐\爱的狂怒.mp3"; Flags: dontcopy