CWMPControls m_control;
COcx1 m_avPlayer;
问题:
this->m_control=static_cast<CWMPControls>(this->m_avPlayer.get_controls());
this->m_control.pause();
报错:错误 1 error C2440: 'static_cast' : cannot convert from 'LPDISPATCH' to 'CWMPControls' f:\hq\aviplayer\aviplayer\aviplayerdlg.cpp 170
应该怎么转换啊,高手帮帮忙
------解决方案--------------------------------------------------------
我的VC++ 2010生成的类是这样的
class CWMPControls : public COleDispatchDriver
{
public:
CWMPControls() {} // Calls COleDispatchDriver default constructor
CWMPControls(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
CWMPControls(const CWMPControls& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}
看看老帖子使用Media Player控件和ActiveX的几个问题