Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. playing and audio "wav" file

playing and audio "wav" file

Scheduled Pinned Locked Moved C / C++ / MFC
comhelptutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    si_69
    wrote on last edited by
    #1

    hi i am looking to read an wav file into an activeX windows mediaplayer i know the location of my file, but i dont know how to get it to play it seems to open, but what do i need to do to make it play. help....i am a novice so be gentle this is what i have got so far, im missing the bit i need to put in the try bit char* message = ("D:\\callparent\\new_name\\020612125252-33381.wav"); CFile myFile(message, CFile::modeCreate|CFile::modeNoTruncate|CFile::modeWrite|CFile::typeBinary|CFile::shareDenyNone); try { return TRUE; } catch(CException* pE) { pE->ReportError(); pE->Delete(); myFile.Close(); return FALSE; } ;)

    A B 2 Replies Last reply
    0
    • S si_69

      hi i am looking to read an wav file into an activeX windows mediaplayer i know the location of my file, but i dont know how to get it to play it seems to open, but what do i need to do to make it play. help....i am a novice so be gentle this is what i have got so far, im missing the bit i need to put in the try bit char* message = ("D:\\callparent\\new_name\\020612125252-33381.wav"); CFile myFile(message, CFile::modeCreate|CFile::modeNoTruncate|CFile::modeWrite|CFile::typeBinary|CFile::shareDenyNone); try { return TRUE; } catch(CException* pE) { pE->ReportError(); pE->Delete(); myFile.Close(); return FALSE; } ;)

      A Offline
      A Offline
      Alvaro Mendez
      wrote on last edited by
      #2

      What is this "activeX windows mediaplayer"? Is it a control in your dialog box? How did you add it? Please provide more info. Regards, Alvaro


      When birds fly in the right formation, they need only exert half the effort. Even in nature, teamwork results in collective laziness. -- despair.com

      1 Reply Last reply
      0
      • S si_69

        hi i am looking to read an wav file into an activeX windows mediaplayer i know the location of my file, but i dont know how to get it to play it seems to open, but what do i need to do to make it play. help....i am a novice so be gentle this is what i have got so far, im missing the bit i need to put in the try bit char* message = ("D:\\callparent\\new_name\\020612125252-33381.wav"); CFile myFile(message, CFile::modeCreate|CFile::modeNoTruncate|CFile::modeWrite|CFile::typeBinary|CFile::shareDenyNone); try { return TRUE; } catch(CException* pE) { pE->ReportError(); pE->Delete(); myFile.Close(); return FALSE; } ;)

        B Offline
        B Offline
        Brigsoft
        wrote on last edited by
        #3

        Use: #include sndPlaySound(...) without any fileopen, etc. Best regards, Alex. ================================ Useful links

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups