- // My problem with this was only with a previous patch, probably the
- // third rewrite fixed it as a side-effect. In fact, the erase
- // background style of drawing not only works now, but is much better
- // than paint-based updates (the paint event handler flickers if the
- // wxMediaCtrl shares a sizer with another child window, or is on a
- // notebook)
- // - Greg Hazel
- m_ctrl->Connect(m_ctrl->GetId(), wxEVT_ERASE_BACKGROUND,
- wxEraseEventHandler(wxAMMediaEvtHandler::OnEraseBackground),
- NULL, (wxEvtHandler*) this);
+ // don't erase the background of our control window so that resizing is a
+ // bit smoother
+ m_ctrl->SetBackgroundStyle(wxBG_STYLE_CUSTOM);