•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 456,507 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,661 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser: Programming Forums
Views: 2398 | Replies: 19
![]() |
It can be tricky, there is a playSound function in C++ but it's not all that powerful so you may be best suited to look for a library to do that, or feel free to get your hands dirty with some DirectX.

http://msdn2.microsoft.com/en-us/library/ms712879.aspx

http://msdn2.microsoft.com/en-us/library/ms712879.aspx
!!!!! WARNING YOUR COMPUTER MAY BE INFECTED WITH SPYWARE!!!! PAY AN OVER PRICED AMMOUNT TO HAVE SOMTHING FIXED WE PLACED THERE IN THE FIRST PLACE!!!!!!!!!
sound familiar, know how to block yourself and keep yourself clean.
_____________________
http://www.lavasoftusa.com/ -->adaware
http://www.safer-networking.org/en/index.html -->spybot S&D
http://www.javacoolsoftware.com/spywareblaster.html -->spywareblaster
http://www.javacoolsoftware.com/spywareguard.html -->spywareguard
_____________________
and dont forget to spread the reputation to those that deserve!
sound familiar, know how to block yourself and keep yourself clean.
_____________________
http://www.lavasoftusa.com/ -->adaware
http://www.safer-networking.org/en/index.html -->spybot S&D
http://www.javacoolsoftware.com/spywareblaster.html -->spywareblaster
http://www.javacoolsoftware.com/spywareguard.html -->spywareguard
_____________________
and dont forget to spread the reputation to those that deserve!
•
•
Join Date: Sep 2007
Posts: 11
Reputation:
Rep Power: 2
Solved Threads: 0
•
•
•
•
It can be tricky, there is a playSound function in C++ but it's not all that powerful so you may be best suited to look for a library to do that, or feel free to get your hands dirty with some DirectX.
http://msdn2.microsoft.com/en-us/library/ms712879.aspx
Ok the site you gave me had this code one it.
BOOL PlaySound(
LPCSTR pszSound,
HMODULE hmod,
DWORD fdwSound
);
but I dont see where I insert the name of my sound file.
•
•
Join Date: Sep 2007
Posts: 11
Reputation:
Rep Power: 2
Solved Threads: 0
•
•
•
•
I've always thought about this too....but if you need different colour text..i think you could use "
#define yl system("color 0e");".
um ok you lost me here why would I have to change the text color to add a sound file? Although I would like to know how to change the text color also with this code do I just change ("color 0e ") to the color I want?
If so does C++ have built in colors that can be defined just by their name like in HTML or is there another method for defining colors? Hexidecimal codes or something.
In case you guys cant tell I'm fairly new to C++
. Last edited by eeneilson : Sep 27th, 2007 at 9:41 pm.
•
•
Join Date: Sep 2007
Posts: 11
Reputation:
Rep Power: 2
Solved Threads: 0
mciSendString("play the_file",NULL,0,NULL);
Ok for this do I just change the "the_file" to the name of my wave file?
![]() |
•
•
•
•
•
•
•
•
DaniWeb C++ Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- sound of a water drip (Windows NT / 2000 / XP / 2003)
- #include custom files (C++)
- How To Load Sound Files In C++ (C++)
- Sound Troubles (Windows 9x / Me)
- sound file switching (C)
- Please~~~ Need help including sound files in the form! (C#)
- Problems with Windows Script Encoder & #include directive (ASP)
- no sound when playing mp3 or wma files (Windows NT / 2000 / XP / 2003)
- Can you add pictures/sounds in a win32 console app? (C)
Other Threads in the C++ Forum
- Previous Thread: Sum of Series help
- Next Thread: Confusing Problem



Linear Mode