CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2009
    Posts
    8

    Question PlaySound function which include reqd How to make it work?

    How do I get the fn PlaySound work in VC++ (6.0)?
    I included mmsyatem.h file? any other file to include?

    Raghavan141248

  2. #2
    Join Date
    Dec 2008
    Posts
    144

    Re: PlaySound function which include reqd How to make it work?

    Do you get any errors?

  3. #3
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,633

    Re: PlaySound function which include reqd How to make it work?

    Code:
    #include <mmsystem.h>
    #pragma comment(lib, "winmm.lib") // needed only once somewhere in the source code
    Best regards,
    Igor

  4. #4
    Join Date
    Jul 2009
    Posts
    37

    Re: PlaySound function which include reqd How to make it work?

    Quote Originally Posted by raghavan141248 View Post
    How do I get the fn PlaySound work in VC++ (6.0)?
    I included mmsyatem.h file? any other file to include?

    Raghavan141248
    Hello, the previous version of VS doesn't offer as many features as the latest VS05, VS08 and VS10

    Oppps, I am in a true mood you may know,
    Sig-na-tju-(r)

  5. #5
    Join Date
    May 2004
    Location
    45,000FT Above Nevada
    Posts
    1,539

    Re: PlaySound function which include reqd How to make it work?

    Quote Originally Posted by ThachQuanVy View Post
    Hello, the previous version of VS doesn't offer as many features as the latest VS05, VS08 and VS10

    Oppps, I am in a true mood you may know,
    Add the items as mentioned by Igor then add a function...this works in VC6

    Code:
     PlaySound("c:/windows/media/XXX.wav",  NULL, SND_ASYNC);
    Jim
    ATP BE400 CE500 (C550B-SPW) CE560XL MU300 CFI CFII

    "The speed of non working code is irrelevant"... Of course that is just my opinion, I could be wrong.

    "Nothing in the world can take the place of persistence. Talent will not; nothing is more common than unsuccessful men with talent. Genius will not; unrewarded genius is almost a proverb. Education will not; the world is full of educated derelicts. Persistence and determination are omnipotent. The slogan 'press on' has solved and always will solve the problems of the human race."...Calvin Coolidge 30th President of the USA.

Tags for this Thread

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