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. how to run the MS-media palyer component..

how to run the MS-media palyer component..

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
4 Posts 2 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.
  • V Offline
    V Offline
    vasu_sri
    wrote on last edited by
    #1

    hi sir, i have mp3,avi and picture files . i have to show that files into my application like preview so.. i designed one dialog based application. after that i added the media player component into my dialog box. and created one object for that component.then how can i run that component .. means what the functions to run the media player .how to pass the file to media player component.

    Regards, Srinivas

    T 1 Reply Last reply
    0
    • V vasu_sri

      hi sir, i have mp3,avi and picture files . i have to show that files into my application like preview so.. i designed one dialog based application. after that i added the media player component into my dialog box. and created one object for that component.then how can i run that component .. means what the functions to run the media player .how to pass the file to media player component.

      Regards, Srinivas

      T Offline
      T Offline
      thammadi
      wrote on last edited by
      #2

      vasu_sri wrote:

      i have mp3,avi and picture files . i have to show that files into my application like preview so..

      Your requirement can be met by using Windows Media Player component for playing audio/video files. Follow the below steps: Create a dialog box application. Select Project->Add to Project->Components and Controls. Select Registered ActiveX Controls folder Select Windows Media Player component When you select, a confirm classes dialog box appears. Click "OK" Go to your dialog resource. Windows Media Player icon would be displayed on the controls selection view. drag drop the control onto your dlg box. Add a member variable for the control in the class wizard. Use 'SetURL' and GetControls() methods of the media player object for controlling the audio/video files (like play, pause, stop etc.) E.g m_MPlayer.SetUrl("D:\\Songs\\Xyz.mp3"); m_MPlayer.GetControls().play(); FYI: I am using Windows Media Player Ver 11 Hope this helps! :) Thammadi

      V 1 Reply Last reply
      0
      • T thammadi

        vasu_sri wrote:

        i have mp3,avi and picture files . i have to show that files into my application like preview so..

        Your requirement can be met by using Windows Media Player component for playing audio/video files. Follow the below steps: Create a dialog box application. Select Project->Add to Project->Components and Controls. Select Registered ActiveX Controls folder Select Windows Media Player component When you select, a confirm classes dialog box appears. Click "OK" Go to your dialog resource. Windows Media Player icon would be displayed on the controls selection view. drag drop the control onto your dlg box. Add a member variable for the control in the class wizard. Use 'SetURL' and GetControls() methods of the media player object for controlling the audio/video files (like play, pause, stop etc.) E.g m_MPlayer.SetUrl("D:\\Songs\\Xyz.mp3"); m_MPlayer.GetControls().play(); FYI: I am using Windows Media Player Ver 11 Hope this helps! :) Thammadi

        V Offline
        V Offline
        vasu_sri
        wrote on last edited by
        #3

        it showing GetControlContainer() and GetControlSite() like this iam not getting proper functions ... i want these like Play , Pause and stop functions how can i get these functions... :omg:

        Regards, Srinivas

        T 1 Reply Last reply
        0
        • V vasu_sri

          it showing GetControlContainer() and GetControlSite() like this iam not getting proper functions ... i want these like Play , Pause and stop functions how can i get these functions... :omg:

          Regards, Srinivas

          T Offline
          T Offline
          thammadi
          wrote on last edited by
          #4

          I created a test application and I am using GetControls() method, which returns an object of class CWMPControls. This class has all the control methods like play, pause, stop etc. As I said earlier I am using WMP ver 11. I am not sure if the above class is defined for earlier versions of the WMP control. Try to upgrade your WMP to 11 and check it out. If it doesn't work out.. I'll share my test source code then.. Thammadi

          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