
24-04-2013, 12:18
|
 |
Registered User
|
|
Join Date: Jun 2012
Location: Brazil
Posts: 70
Thanks: 11
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by Razor12911
you use this
function sndPlaySound(lpszSoundName: String; uFlags: cardinal):integer; external ' [email protected] stdcall';
example
sndPlaySound(ExpandConstant('{tmp}\ButtonSoundSele cted.wav'),$0001);
use these on default buttons
OnClick:=;
OnDblClick:=;
OnMouseDown:=;
use these for custom buttons (botva2 buttons)
BtnSetEvent(,BtnClickEventID,WrapBtnCallback(sndPl aySound(ExpandConstant('{tmp}\ButtonSoundSelected. wav'),$0001);,1));
BtnSetEvent(,BtnMouseEnterEventID,WrapBtnCallback( sndPlaySound(ExpandConstant('{tmp}\ButtonSoundSele cted.wav'),$0001);,1));
|
Hi.
Can you please verify?
The error is:
Line 191:
Column 109:
comma (',') expected.
Code:
with WizardForm.NextButton do begin
hNextBtn:=BtnCreate(WizardForm.Handle,Left-8,Top-8,Width+10,Height+10,ExpandConstant('{tmp}\button.png'),18,False);
BtnSetEvent(hNextBtn,BtnClickEventID,WrapBtnCallback(@WizardFormBtnClick,1));
BtnSetFontColor(hNextBtn,$FFFFFF,$00FFFF,$0000FF,$000000);
BtnSetFont(hNextBtn,ButtonFont.Handle);
//The error is the line below.
BtnSetEvent(hNextBtn,BtnClickEventID,WrapBtnCallback(sndPlaySound(ExpandConstant('{tmp}\soundfx.wav'),$0001);,1));
BtnSetEvent(hNextBtn,BtnMouseEnterEventID,WrapBtnCallback(sndPlaySound(ExpandConstant('{tmp}\soundfx.wav'),$0001);,1));
Width:=0;
Height:=0;
end;
|