View Single Post
  #419  
Old 24-04-2013, 01:48
Razor12911's Avatar
Razor12911 Razor12911 is offline
Noob
 
Join Date: Jul 2012
Location: South Africa
Posts: 3,752
Thanks: 2,187
Thanked 11,212 Times in 2,310 Posts
Razor12911 is on a distinguished road
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));
Reply With Quote