CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Sound

  1. #1
    Join Date
    May 1999
    Posts
    71

    Sound

    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?


  2. #2
    Join Date
    Apr 1999
    Posts
    90

    Re: Sound

    Within VC++, go to the resource folder and select "Import". Within the file selection dialog that comes up you can specify wave files.


  3. #3
    Join Date
    May 1999
    Posts
    71

    Re: Sound

    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?


  4. #4
    Join Date
    Apr 1999
    Posts
    90

    Re: Sound

    I haven't tried it, but according to the documentation, it should look like:

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


    Michael...
    [email protected]


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured