It works just fine.
Make sure your RC file looks something like
MySound1 RCDATA "spiff.wav"
MySound2 RCDATA "bloink.wav"
Compile it to a resource file (*.res) using whatever program you have to do that (like windres.exe that comes with GNU stuff).
Inside your program, you'll need to use … Read More
Hey there. I just wanted to update my answer a little (I've looked it up to be sure).
It is actually a little easier than I thought it would be. Make your RC file
whizzing_fizzbang WAVE "whizzfizz.wav"
pop_rockets WAVE "poprockets.wav"
Here's a little snippit of how to … Read More
No need to cuss at me... :-O
There is something wrong with your windows.h includes. The LoadResource function, according to Microsoft, looks like this:
[inlinecode]HGLOBAL LoadResource( HMODULE, HRSRC );[/inlinecode]
In my MinGW (GCC) winbase.h file (which is included by windows.h), that is properly listed as:
[inlinecode]WINBASEAPI HGLOBAL WINAPI LoadResource(HINSTANCE,HRSRC);[/inlinecode]
Whatever … Read More
LOTRJ, I just typed that in. THere are bound to be some small mistakes. You are expected to use it to get started in finding the information you need to do this yourself.
The function is [inlinecode]sndPlaySound[/inlinecode] (with a lowercase S at the beginning).
And yes, the std::string needs to … Read More