Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Variable instead of wav file
Message
From
24/03/2010 14:19:42
 
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01453613
Message ID:
01457017
Views:
50
>Is it possible to feed a variable to SET BELL instead of a WAV file? I'd like to store the WAV files in a table and use one without first writing it to the disk.
#Define SND_SYNC		0x0000  && play synchronously (default) */
#Define SND_ASYNC		0x0001  && play asynchronously */
#Define SND_NODEFAULT	0x0002  && silence (!default) if sound not found */
#Define SND_MEMORY		0x0004  && pszSound points to a memory file */
#Define SND_LOOP		0x0008  && loop the sound until next sndPlaySound */
#Define SND_NOSTOP		0x0010  && don't stop any currently playing sound */

#Define SND_NOWAIT		0x00002000 && don't wait if the driver is busy */
#Define SND_ALIAS		0x00010000 && name is a registry alias */
#Define SND_ALIAS_ID	0x00110000 && alias is a predefined ID */
#Define SND_FILENAME	0x00020000 && name is file name */
#Define SND_RESOURCE	0x00040004 && name is resource name or atom */

m.lcSound = Filetostr(Home(1) + "Gallery\Media\chimes.wav")

_PlaySound(m.lcSound, 0, Bitor(SND_MEMORY, SND_ASYNC, SND_NODEFAULT))

Procedure _PlaySound
Lparameters pszSound, hmod, fdwSound

Declare Integer PlaySound In Winmm.Dll As _apiPLaySound ;
	String  pszSound, ;
	Integer hmod, ;
	Integer fdwSound

Return _apiPLaySound(m.pszSound, m.hmod, m.fdwSound)
Endproc
Previous
Reply
Map
View

Click here to load this message in the networking platform