Using Win32 functions in Visual FoxPro Image Gallery
Windows Multimedia
..msdn
AVIFileExit
AVIFileGetStream
AVIFileInfo
AVIFileInit
AVIFileOpen
AVIFileRelease
AVIFileWriteData
AVIStreamGetFrame
AVIStreamGetFrameClose
AVIStreamGetFrameOpen
AVIStreamInfo
AVIStreamLength
AVIStreamReadFormat
AVIStreamRelease
AVIStreamStart
AVIStreamTimeToSample
capCreateCaptureWindow
capGetDriverDescription
DrawDibClose
DrawDibDraw
DrawDibOpen
mciGetDeviceID
mciGetErrorString
mciSendCommand
mciSendString
midiOutClose
midiOutGetDevCaps
midiOutGetNumDevs
midiOutOpen
midiOutReset
midiOutShortMsg
mixerClose
mixerGetControlDetails
mixerGetDevCaps
mixerGetID
mixerGetLineControls
mixerGetLineInfo
mixerGetNumDevs
mixerOpen
mixerSetControlDetails
mmioAscend
mmioClose
mmioCreateChunk
mmioDescend
mmioFlush
mmioOpen
mmioRead
mmioSeek
mmioWrite
PlaySound
sndPlaySound
timeGetDevCaps
waveInAddBuffer
waveInClose
waveInGetDevCaps
waveInGetErrorText
waveInGetNumDevs
waveInGetPosition
waveInOpen
waveInPrepareHeader
waveInReset
waveInStart
waveInStop
waveInUnprepareHeader
waveOutClose
waveOutGetDevCaps
waveOutGetErrorText
waveOutGetNumDevs
waveOutGetPosition
waveOutGetVolume
waveOutOpen
waveOutPrepareHeader
waveOutReset
waveOutSetVolume
waveOutUnprepareHeader
waveOutWrite
Code examples:
Playing WAV files on InteractiveChange
PlaySound
..msdn    Add comment     W32 Constants      Translate this page
Plays a sound specified by the given file name, resource, or system event.
Code examples:
Playing WAV files on InteractiveChange
Declaration:
BOOL PlaySound(
    LPCTSTR pszSound,
    HMODULE hmod,
    DWORD fdwSound
);
FoxPro declaration:
DECLARE INTEGER PlaySound IN winmm;
    STRING pszSound,;
    INTEGER hmod,;
    LONG fdwSound
Parameters:
pszSound
A string that specifies the sound to play. The maximum length, including the null terminator, is 256 characters.

hmod
Handle to the executable file that contains the resource to be loaded. This parameter must be NULL unless SND_RESOURCE is specified in fdwSound.

fdwSound
Flags for playing the sound.
Return value:
Returns TRUE if successful or FALSE otherwise.
Usage:
#DEFINE SND_FILENAME 0x20000 
#DEFINE SND_ASYNC 1

= PlaySound("c:\windows\media\tada.wav", 0,;
    BITOR(SND_FILENAME, SND_ASYNC))
My comment:
For playing system sounds rather than sounds stored in WAV files, it is better to declare this function as follows:
DECLARE INTEGER PlaySound IN winmm;
        LONG pszSound, INTEGER hmod, LONG fdwSound

Below is FoxPro equivalent to sndAlias("S", "W") macro (SND_ALIAS_SYSTEMWELCOME) :
nSoundId = BITOR(buf2dword(PADR("S",4,CHR(0))),;
        BITLSHIFT(buf2dword(PADR("W",4,CHR(0))),8)) && returns 22355

This will play the SND_ALIAS_SYSTEMWELCOME sound:
= PlaySound(22355, 0, BITOR(SND_ALIAS_ID, SND_ASYNC))

See also: sndPlaySound
Word Index links for the PlaySound :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2008-03-25 15:28:58
Modified: 2009-01-15 15:50:35
Visited in last 7 days: 70
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2014 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.1.68), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.242.140.11)
2.32 min.Example: 'Displaying printer-properties Property Sheet for the specified printer'
Google
Advertise here!