home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / database / p4w_all.zip / TI1247.ASC < prev    next >
Text File  |  1993-01-29  |  3KB  |  133 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.   PRODUCT  :  Paradox for Windows                   NUMBER  :  1247
  9.   VERSION  :  1.0
  10.        OS  :  WIN
  11.      DATE  :  January 29, 1993                         PAGE  :  1/2
  12.  
  13.     TITLE  :  Playing MultiMedia Sounds in Paradox for Windows
  14.  
  15.  
  16.  
  17.  
  18.   Intended Audience:
  19.   This document is for all ObjectPAL programmers.
  20.  
  21.   Prerequisites:
  22.   The reader must have a basic understanding of how to configure
  23.   Microsoft Windows to play sounds, as well as the names of the
  24.   sound files they wish to play.
  25.  
  26.   Purpose:
  27.   To enable you to play Microsoft Windows sounds from your Paradox
  28.   for Windows applications.
  29.  
  30.   Paradox for Windows uses the Microsoft Windows MMSYSTEM.DLL
  31.   directly to play sounds on your PC.  In order to make proper use
  32.   of this, you will need to configure Windows to use your sound
  33.   card or PC-Speaker.  Otherwise the sound playing ability of
  34.   Windows is disabled.
  35.  
  36.   The ObjectPAL code required to play you sound is as follows.  You
  37.   first must define the use of the function and DLL in the uses
  38.   statement of the object you are placing this code on.
  39.  
  40.        uses MMSYSTEM
  41.             sndPlaySound(what CPTR, how cword) cword
  42.        endUses
  43.  
  44.   The MMSYSTEM is the DLL being accessed.  The definition of the
  45.   sndPlaySound function and its parameters and return type are
  46.   found in the Windows Developer's manuals.
  47.  
  48.   The code to actually play a sound is:
  49.  
  50.        method pushButton(var eventInfo Event)
  51.             sndPlaySound("SystemAsterisk",1)
  52.        endmethod
  53.  
  54.   This code will play the sound file that is defined as the
  55.   Asterisk in you Sound applet in the Control Panel.  The term
  56.   SystemAsterisk is how the path to this sound is stored in the
  57.   WIN.INI file.  You can actually create your own system sounds in
  58.   the WIN.INI and play them, allowing you to easily change the
  59.   sounds using the Control Panel.
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.   PRODUCT  :  Paradox for Windows                   NUMBER  :  1247
  75.   VERSION  :  1.0
  76.        OS  :  WIN
  77.      DATE  :  January 29, 1993                         PAGE  :  2/2
  78.  
  79.     TITLE  :  Playing MultiMedia Sounds in Paradox for Windows
  80.  
  81.  
  82.  
  83.  
  84.   If you'd rather not clutter up the WIN.INI file, you can replace
  85.   the system sound name with a path as follows:
  86.  
  87.        sndPlaySound("c:\\windows\\sounds\\mysound.wav",1)
  88.  
  89.   This will play the mysound.wav file in the C:\WINDOWS\SOUNDS
  90.   subdirectory.  You should probably add code, testing the
  91.   existence of the file, if you intend to deliver this in an
  92.   application.
  93.  
  94.  
  95.   DISCLAIMER: You have the right to use this technical information
  96.   subject to the terms of the No-Nonsense License Statement that
  97.   you received with the Borland product to which this information
  98.   pertains.
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.