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 a file

Playing a file

Scheduled Pinned Locked Moved C / C++ / MFC
question
6 Posts 6 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.
  • K Offline
    K Offline
    Kiran Pinjala
    wrote on last edited by
    #1

    If i have the wmplayer path as ("C:\program files\windows media player\wmplayer.exe") and an audio file( audio.wav ), How can i play the file in runtime? thanks in advance.

    KIRAN PINJARLA

    C R A H C 5 Replies Last reply
    0
    • K Kiran Pinjala

      If i have the wmplayer path as ("C:\program files\windows media player\wmplayer.exe") and an audio file( audio.wav ), How can i play the file in runtime? thanks in advance.

      KIRAN PINJARLA

      C Offline
      C Offline
      CPallini
      wrote on last edited by
      #2

      What about ShellExecute?

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.

      1 Reply Last reply
      0
      • K Kiran Pinjala

        If i have the wmplayer path as ("C:\program files\windows media player\wmplayer.exe") and an audio file( audio.wav ), How can i play the file in runtime? thanks in advance.

        KIRAN PINJARLA

        R Offline
        R Offline
        Rajesh R Subramanian
        wrote on last edited by
        #3

        kiran.pinjarla wrote:

        If i have the wmplayer path as ("C:\program files\windows media player\wmplayer.exe")

        Why on earth do you need to know the path of wmplayer.exe? Just open the .wav file with ShellExecute() and the application that is associated with this file type will open it for you.


        Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா

        1 Reply Last reply
        0
        • K Kiran Pinjala

          If i have the wmplayer path as ("C:\program files\windows media player\wmplayer.exe") and an audio file( audio.wav ), How can i play the file in runtime? thanks in advance.

          KIRAN PINJARLA

          A Offline
          A Offline
          Abhijeet Rajput
          wrote on last edited by
          #4

          Yes Dear, First u fill the structure which u ll have to pass as a parameter in ShellExecute() method. You dont need to know the path of player which is going to play that file. Abhijeet

          1 Reply Last reply
          0
          • K Kiran Pinjala

            If i have the wmplayer path as ("C:\program files\windows media player\wmplayer.exe") and an audio file( audio.wav ), How can i play the file in runtime? thanks in advance.

            KIRAN PINJARLA

            H Offline
            H Offline
            Hamid Taebi
            wrote on last edited by
            #5

            Use of ShellExecute and dont forgot to insert two \\ instead \


            WhiteSky


            1 Reply Last reply
            0
            • K Kiran Pinjala

              If i have the wmplayer path as ("C:\program files\windows media player\wmplayer.exe") and an audio file( audio.wav ), How can i play the file in runtime? thanks in advance.

              KIRAN PINJARLA

              C Offline
              C Offline
              Cristian Amarie
              wrote on last edited by
              #6

              You can try also MCIWndCreate.

              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