Solved

Get defualt path of wave file

Posted on 2000-03-01
3
165 Views
Last Modified: 2010-04-04
Hi,
I want defult path of wave file such like wave on error in windows beep.wav
and in other Pc or OS xx.wav i want the defult path to send it to SndPalySound(defult path,1)

Abdelghani
0
Comment
Question by:ghuna388
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 

Expert Comment

by:kangxy
ID: 2572319
Why not use MessageBeep function :)
The MessageBeep function plays a waveform sound. The waveform sound for each sound type is identified by an entry in the [sounds] section of the registry.

BOOL MessageBeep(

    UINT uType       // sound type  
   );

Remarks

After queuing the sound, the MessageBeep function returns control to the calling function and plays the sound asynchronously.
If it cannot play the specified alert sound, MessageBeep attempts to play the system default sound. If it cannot play the system default sound, the function produces a standard beep sound through the computer speaker.
The user can disable the warning beep by using the Control Panel Sound application.
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 2572788
Use Delphi's Beep procedure...
0
 
LVL 17

Accepted Solution

by:
inthe earned 20 total points
ID: 2573678
Hello
these sounds are already defined in mmsystem.pas so to use them just add mmsystem to uses section and use playsound functions:

  PlaySound(pChar('SYSTEMDEFAULT'),0,SND_SYNC);

PlaySound(pChar('SYSTEMSTART'),0,SND_SYNC);

  PlaySound(pChar('SYSTEMEXIT'),0,SND_SYNC);

  PlaySound(pChar('SYSTEMHAND'),0,SND_SYNC);

  PlaySound(pChar('SYSTEMASTERISK'),0,SND_SYNC);

  PlaySound(pChar('SYSTEMQUESTION'),0,SND_SYNC);

  PlaySound(pChar('SYSTEMEXCLAMATION'),0,SND_SYNC);

  PlaySound(pChar('SYSTEMWELCOME'),0,SND_SYNC);


Regards Barry
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question