Tuesday, July 27th, 2010, 563 days ago

Augmented codes of using media play control in MFC

media player control in MFCUsing media player control in MFC is not as easy as dragging in a button control. Usually there are some high frequent errors such as ‘cannot convert from LPDISPATCH to CWMPMedia/CWMPControls’, and the worse thing is that even Google is not able to provide proper solutions to address these errors except dozens of posts raising similar problems waiting for somebody to provide positive solutions.

I have experienced that and that was awful. Therefore i decide to share these solutions by providing functional codes as below. The solution is easy, after adding new media player relevant classes then, using codes below to replace those generated automatically by system. The key part of the change is from ‘public:CWND’ to ‘public:COleDispatchDriver’.

CWMPControls.cpp

CWMPControls.h

CWMPMedia.cpp

CWMPMedia.h

CWMPPlaylist.cpp

CWMPPlaylist.h

CWMPSettings.cpp

CWMPSettings.h

ocx1.cpp

ocx1.h


One Response to “Augmented codes of using media play control in MFC”

  1. Indu, Rahul, Uthara says:

    Hey. We’re a group of 3 and are planning to do a project on hand gesture recognition. We’re final year Computer Science engineering students. Project duration is about 3 months or lesser. Completely unaware of OpenCV and OpenGl.
    What would you suggest we do?

Leave a Reply

You can use these XHTML tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>