play a .wav-file with c++ builder 5.0

Started by
1 comment, last by hewlett 22 years, 3 months ago
Hello together I would like to play on a Click Event (Button or so) a wav-File. The wav-file is in the same directory as the .cpp file. Do you have any idea how to get it? Thank you very much hewlett
Advertisement
This is a lazzy way: you can use the MediaPlayer control located at the System Tab.

"- To begin with, said the Cat, a dog''s not mad. You grant that?
- I suppose so, said Alice.
- Well, then, - the Cat went on - you see, a dog growls when it''s angry, and wags its tail when it''s pleased. Now I growl when I''m pleased, and wag my tail when I''m angry. Therefore I''m mad."
"- To begin with, said the Cat, a dog's not mad. You grant that? - I suppose so, said Alice. - Well, then, - the Cat went on - you see, a dog growls when it's angry, and wags its tail when it's pleased. Now I growl when I'm pleased, and wag my tail when I'm angry. Therefore I'm mad."
Look up PlaySound() is you are using Windows.

It can only play one sound at a time but it''s very simple to use.
-------------Ban KalvinB !

This topic is closed to new replies.

Advertisement