home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1993 #2
/
Image.iso
/
database
/
p4w_all.zip
/
TI1247.ASC
< prev
next >
Wrap
Text File
|
1993-01-29
|
3KB
|
133 lines
PRODUCT : Paradox for Windows NUMBER : 1247
VERSION : 1.0
OS : WIN
DATE : January 29, 1993 PAGE : 1/2
TITLE : Playing MultiMedia Sounds in Paradox for Windows
Intended Audience:
This document is for all ObjectPAL programmers.
Prerequisites:
The reader must have a basic understanding of how to configure
Microsoft Windows to play sounds, as well as the names of the
sound files they wish to play.
Purpose:
To enable you to play Microsoft Windows sounds from your Paradox
for Windows applications.
Paradox for Windows uses the Microsoft Windows MMSYSTEM.DLL
directly to play sounds on your PC. In order to make proper use
of this, you will need to configure Windows to use your sound
card or PC-Speaker. Otherwise the sound playing ability of
Windows is disabled.
The ObjectPAL code required to play you sound is as follows. You
first must define the use of the function and DLL in the uses
statement of the object you are placing this code on.
uses MMSYSTEM
sndPlaySound(what CPTR, how cword) cword
endUses
The MMSYSTEM is the DLL being accessed. The definition of the
sndPlaySound function and its parameters and return type are
found in the Windows Developer's manuals.
The code to actually play a sound is:
method pushButton(var eventInfo Event)
sndPlaySound("SystemAsterisk",1)
endmethod
This code will play the sound file that is defined as the
Asterisk in you Sound applet in the Control Panel. The term
SystemAsterisk is how the path to this sound is stored in the
WIN.INI file. You can actually create your own system sounds in
the WIN.INI and play them, allowing you to easily change the
sounds using the Control Panel.
PRODUCT : Paradox for Windows NUMBER : 1247
VERSION : 1.0
OS : WIN
DATE : January 29, 1993 PAGE : 2/2
TITLE : Playing MultiMedia Sounds in Paradox for Windows
If you'd rather not clutter up the WIN.INI file, you can replace
the system sound name with a path as follows:
sndPlaySound("c:\\windows\\sounds\\mysound.wav",1)
This will play the mysound.wav file in the C:\WINDOWS\SOUNDS
subdirectory. You should probably add code, testing the
existence of the file, if you intend to deliver this in an
application.
DISCLAIMER: You have the right to use this technical information
subject to the terms of the No-Nonsense License Statement that
you received with the Borland product to which this information
pertains.