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