如何在Inno Setup的按钮点击自定义的咔嗒声(后退+下+取消)? [英] How to have a custom click sound on button click in Inno Setup (Back + Next + Cancel)?
本文介绍了如何在Inno Setup的按钮点击自定义的咔嗒声(后退+下+取消)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何有按钮单击Inno Setup的声音?
How to have button click sounds in Inno setup?
我的意思是不同的返回的下一步的和的取消的
I mean a different for "Back", "Next" and "Cancel".
我知道可能有一些问题,还回答了他们,但我是新来这个网站,我需要一些帮助。
I know there might be some questions and also answers to them, but I'm new to this site and I need some help.
在此先感谢...
推荐答案
您可以使用的汇创媒体播放器来播放声音。
You can use Inno Media Player to play sounds.
这是Inno Setup的过程中看到问题的播放声音安装。
See question Playing sound during an Inno Setup install.
要触发声音的按钮点击使用code,如:
To trigger the sound on button clicks use a code like:
procedure PlaySound(FileName: string);
begin
ExtractTemporaryFile(FileName);
if DSInitializeAudioFile(ExpandConstant('{tmp}\') + FileName), nil) then
begin
DSPlayMediaFile;
end;
end;
function NextButtonClick(CurPageID: Integer): Boolean;
begin
PlaySound('next.mp3');
Result := True;
end;
function BackButtonClick(CurPageID: Integer): Boolean;
begin
PlaySound('back.mp3');
Result := True;
end;
procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
PlaySound('cancel.mp3');
end;
这篇关于如何在Inno Setup的按钮点击自定义的咔嗒声(后退+下+取消)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文