I wrote this "Hello-world" code in order to study the wxWidgets under cross-compilation (Windows/Linux):
Code: Select all
bool GuiCtrl::OnInit()
{
m_controlwindow = new wxFrame(NULL, wxID_ANY, "Driver Control Panel", wxDefaultPosition, wxSize(600, 600));
m_controlwindow->CreateStatusBar(2);
m_controlwindow->SetStatusText("Welcome to wxWidgets!");
m_controlwindow->SetBackgroundColour(wxColour(*wxBLUE));
m_controlwindow->Show();
m_controlpanel = new wxPanel(m_controlwindow, wxID_ANY, wxDefaultPosition, wxSize(200, 200));
m_controlpanel->SetBackgroundColour(wxColour(*wxRED));
m_controlpanel->CenterOnParent(wxBOTH);
m_controlwindow->Update();
m_quitbutton = new wxButton(m_controlpanel, wxID_EXIT,"", wxDefaultPosition);
m_quitbutton->Bind(wxEVT_BUTTON, &GuiCtrl::onQuit, this);
m_quitbutton->CenterOnParent(wxBOTH);
m_quitbutton->Show();
m_controlwindow->Update();
return true;
}
MS Windows 10 CentOS 7 + MWM (Gtk 3.14.13) I have no problem in compilation. The only way to solve the problem in MS Windows 10 is not use the status bar. As a matter of fact, if I remove the two lines:
Code: Select all
m_controlwindow->CreateStatusBar(2);
m_controlwindow->SetStatusText("Welcome to wxWidgets!");