- //m_ctrl->Connect(m_ctrl->GetId(), wxEVT_PAINT,
- // wxPaintEventHandler(wxAMMediaEvtHandler::OnPaint),
- // NULL, (wxEvtHandler*) this);
-
- //
- // As noted below, we need to catch the Top Level Window's
- // move events because they are not sent to us if the media control
- // size remains the same but it actually moves in window coordinates
- //
- wxWindow* pTheTLW = m_ctrl->GetParent();
- while( pTheTLW->GetParent() )
- pTheTLW = pTheTLW->GetParent();
-
- //
- // FIXMEHACKFIXMEHACKFIXME
- // This is really nasty... basically the deal is not only above
- // but the repainting is messed up when the parent is maximized
- // too, so we've got to catch all 4 events!
- //
- m_ctrl->Connect(m_ctrl->GetId(), wxEVT_MOVE,
- wxMoveEventHandler(wxAMMediaEvtHandler::OnMove),
- NULL, (wxEvtHandler*) this);
- m_ctrl->Connect(m_ctrl->GetId(), wxEVT_SIZE,
- wxSizeEventHandler(wxAMMediaEvtHandler::OnSize),
- NULL, (wxEvtHandler*) this);
-
- pTheTLW->Connect(pTheTLW->GetId(), wxEVT_MOVE,
- wxMoveEventHandler(wxAMMediaEvtHandler::OnMove),
- NULL, (wxEvtHandler*) this);
- pTheTLW->Connect(pTheTLW->GetId(), wxEVT_SIZE,
- wxSizeEventHandler(wxAMMediaEvtHandler::OnSize),
- NULL, (wxEvtHandler*) this);