I was wondering if anyone could help me. I'm using wxWidgets and wxAui in an application and I seem to have come across a problem with wxMediaCtrl. If I do the following:
- Code: Select all
MyFrame::MyFrame(...)
{
...
wxMediaCtrl* pMediaCtrl = new wxMediaCtrl( this, wxID_ANY, "blah.avi" );
pMediaCtrl->ShowPlayerControls();
m_pFrameManager->AddPane( pMediaCtrl );
m_pFrameManager->Update();
}
the code will work fine and I will see a panel with the file able to play in it. What I need to do though is something along the lines of:
- Code: Select all
class MyPanel : wxPanel
{
public:
MyPanel( wxWindow* pParent, wxWindowId windowId, const wxString& filename )
{
wxPanel( pParent, windowId );
m_pMediaCtrl = new wxMediaCtrl( this, MEDIA_CTRL_ENUM, filename );
m_pMediaCtrl->ShowPlayerControls();
}
private:
wxMediaCtrl* m_pMediaCtrl;
};
...
MyFrame::MyFrame(...)
{
...
MyPanel* pPanel = new MyPanel( this, wxID_ANY, "blah.avi" );
m_pFrameManager->AddPane( pPanel );
m_pFrameManager->Update();
}
This time I will be able to hear the audio from the file but I will no longer be able to get any visuals