c++ - How to use Windows Media Player? -


i have old application written in c++ 6.0. application manages sound alarming purpose in manufacturing environment.

now make modifications , use windows media player. knowledge of c++ limited. kind of lost in pointers...

this managed far:

used class wizard add wrapper classes wmplib.dll , included "wmp.h". in .cpp file.

iwmpplayer *player = new iwmpplayer(); //player.seturl("http://streampoint.radioio.com/streams/57/45ec8c85a2a8a/listen.pls"); player->setenabled(true); player->seturl("c:\\tada.wav");  iwmpcontrols *pcontrols = new iwmpcontrols(); *pcontrols = player->getcontrols();  pcontrols->play();   

any suggestions?

thanks

i found way.

at first, wanted without having include wmp activex in view. ended adding , use classwizard create associated member variable in view.

the created member variable of type cwndplayer4.

here code used:

m_backgroundplayer.seturl(m_url); m_backgroundplayer.getsettings().setvolume(100); m_backgroundplayer.getcontrols().play(); 

m_url member variable associated text box in user types url.

i used windows media player 10.00.00.4081 , environment windows xp pro sp3.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -