Thread: Custom resource

  1. #1

    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,981
    So what's the problem?

    gg

  3. #3
    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,981
    What does PlaySound() return and what does GetLastError() return?

    gg

  5. #5
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    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, 12: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