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 .wmv file in an MFC application

playing a .wmv file in an MFC application

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

    All, Is there an easy way, in an MFC application, to launch and automatically play a .WMV file? I don't want to open Windows Media Player, but instead have this video play inside my application. Thanks in advance.:confused:

    C M H 3 Replies Last reply
    0
    • G goodoljosh1980

      All, Is there an easy way, in an MFC application, to launch and automatically play a .WMV file? I don't want to open Windows Media Player, but instead have this video play inside my application. Thanks in advance.:confused:

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      You can embedd the media player inside your app as a control. My memory is rusty on how complex this is to do in C++, although I know it's trivial in C#, if you can handle a .NET dependancy, you could use the .NET control, although it just wraps WMP, so there's no reason you'd need to.

      Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

      1 Reply Last reply
      0
      • G goodoljosh1980

        All, Is there an easy way, in an MFC application, to launch and automatically play a .WMV file? I don't want to open Windows Media Player, but instead have this video play inside my application. Thanks in advance.:confused:

        M Offline
        M Offline
        Mark Salsbery
        wrote on last edited by
        #3

        IMO the easiest way to play a WMV is to use DirectShow[^]. The SDK has enough sample code to do a player with minimal effort. If you want to work with the files, the Windows Media Format SDK is a great resource. See Windows Media Downloads[^]. Mark

        Mark Salsbery Microsoft MVP - Visual C++ :java:

        1 Reply Last reply
        0
        • G goodoljosh1980

          All, Is there an easy way, in an MFC application, to launch and automatically play a .WMV file? I don't want to open Windows Media Player, but instead have this video play inside my application. Thanks in advance.:confused:

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

          See MCI functions,you can find articles about it on the codeproject

          G 1 Reply Last reply
          0
          • H Hamid Taebi

            See MCI functions,you can find articles about it on the codeproject

            G Offline
            G Offline
            goodoljosh1980
            wrote on last edited by
            #5

            I have since tried this and was able to load the video, but the playback is VERY choppy. It seems that it pauses about once a second as if it caching more of the video. Any suggestions as to why this happens?

            H 1 Reply Last reply
            0
            • G goodoljosh1980

              I have since tried this and was able to load the video, but the playback is VERY choppy. It seems that it pauses about once a second as if it caching more of the video. Any suggestions as to why this happens?

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

              Could you load other formats like avi or Mpeg?

              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