Including winmm

This is a discussion on Including winmm within the Windows Programming forums, part of the Platform Specific Boards category; Hi. I'm trying to run .wav file from an MFC app writtten in VC++. I've searched through the board and ...

  1. #1
    Registered User
    Join Date
    Oct 2002
    Posts
    98

    Including winmm

    Hi.

    I'm trying to run .wav file from an MFC app writtten in VC++. I've searched through the board and found that I should use PlaySound, but I don't know how to include the winmm.dll or winmm library in the project.

    Could someone please help?

    Thanks.

  2. #2
    Funniest man in this seat minesweeper's Avatar
    Join Date
    Mar 2002
    Posts
    801
    On the menu select:

    project -> settings

    click the link tab

    select general from the category list box

    add winnmm.lib to the object/library modules text box

    Hope this helps

  3. #3
    Registered User
    Join Date
    Oct 2002
    Posts
    98
    Thanks,

    That is what I was trying, but I kept getting an unrecognised... message about PlaySound when compiling.

    I've actually solved it now... I ran a search for files containing the text "PlaySound" in the include directory, and mmsystem.h came back. When I included that header file, and did what you said about the winmm.lib, PlaySound worked!!

    Thanks for your help.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Including extra .cpp files visual2008
    By Cathalo in forum C++ Programming
    Replies: 9
    Last Post: 06-16-2009, 04:29 AM
  2. Can we have vector of vector?
    By ketu1 in forum C++ Programming
    Replies: 24
    Last Post: 01-03-2008, 05:02 AM
  3. Class files including other classes
    By combatdave in forum C++ Programming
    Replies: 7
    Last Post: 11-04-2006, 12:37 AM
  4. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 01:13 AM
  5. Reading a line including blanks
    By Ec4U2du in forum C++ Programming
    Replies: 4
    Last Post: 11-13-2002, 07:32 PM

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