domingo, 6 de setembro de 2009

Som Programa Clarion - Matos Informatica 06 09 09 08:42

http://www.par2.com/




PROGRAM
!--------------------------------------------------------------------------
! AUTHOR: Larry Sand
! Sample program to illustrate the use of PlaySound() API to play
! a wave file from disk and linked as a resource of the program.
!
! This program requires the Drum.wav file from the Clarion event manager
! example program. It also requires that the Drum.wav file be converted to
! a resource and linked into the program for the SND_RESOURCE version of the
! API call to work.
!
! The WavRes.RC contains a sample script to create the .RES for this project.
!---------------------------------------------------------------------------
MAP
MODULE('Win32')
PlaySound(*CSTRING pszSound, UNSIGNED hMod, UNSIGNED fdwSound),BOOL, PROC, PASCAL, RAW, NAME('PlaySoundA')
END
END

SND_NOWAIT EQUATE(002000h) !0x00002000L /* don't wait if the driver is busy */
SND_ALIAS EQUATE(010000h) !0x00010000L /* name is a registry alias */
SND_ALIAS_ID EQUATE(110000h) !0x00110000L /* alias is a predefined ID */
SND_FILENAME EQUATE(020000h) !0x00020000L /* name is file name */
SND_RESOURCE EQUATE(040004h) !0x00040004L /* name is resource name or atom */

WaveFileName CSTRING(257)

CODE

WaveFileName = 'Drum.wav'
IF PlaySound(WaveFileName, 0, SND_FILENAME)
MESSAGE('Played wav file from disk')
END

WaveFileName = 'DRUMROLL'
IF PlaySound(WaveFileName, SYSTEM{PROP:AppInstance}, SND_RESOURCE)
MESSAGE('Played wav file linked as a resource')
END


Informacoes Computador - Abc Free - Matos Informatica - 06 09 09 08:28



Template Abc