
- #What is default program video player mfc application how to
- #What is default program video player mfc application full
LPUNKNOWN pUnknown = m_MediaPlayer.GetControlUnknown()
#What is default program video player mfc application full
My objective is to have a button clicking which should play full screen. By right clicking on the running media player and selecting zoom full screen I am able to play in full screen.

I see this when I put a break point other wise the code runs fine though it doesnt go to full screen. I get a runtime exception for hrFull )below in code) which says E_UNEXPECTED catastrophic failure. I have been trying to get the media player to play in full screen.
#What is default program video player mfc application how to
The problem I am facing is how to connect the variable to the interface functions? I can send the project files as a zip for this. When I step through I find that message window pops when the vidctrl.open() is called. When I run it a message window pops up saying "member not found" Then I try to call vidctrl.open() again and it builds. So I copy the functions from the CMediaPlayer2.h to ocx1.h The I add vidctrl.open() in my init code. This creates two files ocx1.h and ocx1.cpp Then I add variable name vidctrl of type COcx1 Then choose "ImediaPlayer2" from the interfaces and add it to generated classes.ĬMediaPlayer2 class and CMediaPlayer.h header file. Right click on the media player on the dialog and clickĬlass wizard -> Choose mfc class from type lib (Only this gives windows media player as an optionįrom the available libraries choose "windows media player

Right click and insert activex control on the dialog window.Ĭhoose the windows media player from the list and press OK.Ĥ. Create a mfc application dialog project with activex control enabled.ģ. My objective is to embed the media player in my application and pass a file name to to start playing.ġ. I have been trying to add media player to my mfc dialog and invoke the same to play URL.
