#pragma warning (disable:4310)
#endif
-#if wxUSE_MEDIACTRL
+#if wxUSE_MEDIACTRL && wxUSE_ACTIVEX
#include "wx/mediactrl.h"
LPAMGETERRORTEXT m_lpAMGetErrorText;
wxString GetErrorString(HRESULT hrdsv);
#endif // __WXDEBUG__
+ wxEvtHandler* m_evthandler;
friend class wxAMMediaEvtHandler;
DECLARE_DYNAMIC_CLASS(wxAMMediaBackend)
#endif
m_bestSize(wxDefaultSize)
{
+ m_evthandler = NULL;
}
//---------------------------------------------------------------------------
if (GetMP())
GetMP()->Release();
- m_ctrl->PopEventHandler(true);
+ if (m_evthandler)
+ {
+ m_ctrl->RemoveEventHandler(m_evthandler);
+ delete m_evthandler;
+ }
}
}
#endif
);
// Connect for events
- m_ctrl->PushEventHandler(new wxAMMediaEvtHandler(this));
+ m_evthandler = new wxAMMediaEvtHandler(this);
+ m_ctrl->PushEventHandler(m_evthandler);
//
// Here we set up wx-specific stuff for the default
#include "wx/html/forcelnk.h"
FORCE_LINK_ME(wxmediabackend_am)
-#endif // wxUSE_MEDIACTRL
+#endif // wxUSE_MEDIACTRL && wxUSE_ACTIVEX