Custom resource

This is a discussion on Custom resource within the Windows Programming forums, part of the Platform Specific Boards category; How do I make a custom resource in my resource script? (Using Dev-C++).. I want to add a sound file ...

  1. #1
    Semi n00b Mithoric's Avatar
    Join Date
    Jun 2003
    Posts
    293

    Custom resource

    How do I make a custom resource in my resource script? (Using Dev-C++)..


    I want to add a sound file to my resources and play it, I've tried the following --

    INTRO_AUDIO AUDIO "intro.wav"

    Where INTRO_AUDIO is defined somewhere else .. AUDIO isn't though...

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,691
    So what's the problem?

    gg

  3. #3
    Semi n00b Mithoric's Avatar
    Join Date
    Jun 2003
    Posts
    293
    You mean that's right? Weird, welll the problem is when I call play sound to uhh play it, it doesn't.

    PlaySound( MAKEINTRESOURCE(INTRO_AUDIO), hInstance, SND_ASNC|SND_RESOURCE );

  4. #4
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,691
    What does PlaySound() return and what does GetLastError() return?

    gg

  5. #5
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,691
    GetLastError() will return 1813.

    Change "AUDIO" to "WAVE" in your resource file.

    gg

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Sorting out a resource manager
    By psychopath in forum Game Programming
    Replies: 1
    Last Post: 11-10-2008, 07:12 PM
  2. CreateProcess with Resource of executable, not the Filename
    By Ktulu in forum Windows Programming
    Replies: 4
    Last Post: 11-04-2006, 01:07 AM
  3. Custom resource problem
    By Traveller in forum Windows Programming
    Replies: 2
    Last Post: 06-23-2002, 01:55 PM
  4. Custom Resource -> Char
    By (TNT) in forum Windows Programming
    Replies: 3
    Last Post: 03-30-2002, 08:33 AM
  5. Serial Communications in C
    By ExDigit in forum Windows Programming
    Replies: 7
    Last Post: 01-09-2002, 10:52 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21