I made an application to visualise the stream of my camera. When the application is running, the window display an image (and wxImagePanel) as a background( m_Background in my code). When the user want to displaythe video on the window, m_renderWindow in displayed front of the background. The problem is that I don't know how to define properly the sizers in order to have what I what.
My actual code is :
Code: Select all
m_background = new wxImagePanel(this, wxT("Logo.png"), wxBITMAP_TYPE_PNG);
wxBoxSizer* sizerBackground = new wxBoxSizer(wxHORIZONTAL);
sizerBackground->Add(m_background, 1, wxSHAPED | wxALIGN_CENTER);
m_renderWindow = new wxPanel(this, wxID_ANY);
wxBoxSizer* sizerStream = new wxBoxSizer(wxHORIZONTAL);
sizerStream->Add(m_renderWindow, 1 , wxEXPAND);
sizerBackground->Add(sizerStream);
this->SetSizer(sizerBackground);
Code: Select all
sizerStream->Add(sizerBackground);
this->SetSizer(sizerStream);
With the first configuration I have the image below :
Where the red rectangle is my m_background and when I ask to display the video, nothing append.
With the second configuration I have :
Where the background is not displayed, and when I ask to display the video I have the video rendering like in the picture below :
But I want the first image when I start the application and the third one when I ask to display the video.