Click to See Complete Forum and Search --> : Sound


Locutus
May 4th, 1999, 07:59 AM
I have an application that use Playsound, like this:

PlaySound("21.WAV", NULL, SND_ASYNC | SND_FILENAME);

the sound 21.wav is in the same folder as my application's EXE-file.

Now to my question: Can I import the sound into the project so that
the external soundfile is not needed when I run the program?

Michael Decker
May 4th, 1999, 08:12 AM
Within VC++, go to the resource folder and select "Import". Within the file selection dialog that comes up you can specify wave files.

Locutus
May 4th, 1999, 09:00 AM
I know that part but...

PlaySound("21.WAV", NULL, SND_ASYNC | SND_FILENAME);

does not work. I think that the second parameter should not be NULL
How do I Use PlaySound correct?

Michael Decker
May 4th, 1999, 09:06 AM
I haven't tried it, but according to the documentation, it should look like:

PlaySound("SoundResource", AfxGetResourceHandle(), SND_RESOURCE | SND_ASYNC);


Michael...
mdecker@kodak.com