X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e21d861412f7a113e1f86842cf8f1a7227b12599..dc2ae3558358c13b3944239dfb6536bf45453d2c:/samples/mdi/mdi.cpp diff --git a/samples/mdi/mdi.cpp b/samples/mdi/mdi.cpp index 7727a33fb4..b06f1bf257 100644 --- a/samples/mdi/mdi.cpp +++ b/samples/mdi/mdi.cpp @@ -32,7 +32,8 @@ #include "wx/toolbar.h" #if !defined(__WXMSW__) - #include "mondrian.xpm" + #include "../sample.xpm" + #include "chart.xpm" #endif #include "bitmaps/new.xpm" @@ -111,6 +112,9 @@ END_EVENT_TABLE() // Initialise this in OnInit, not statically bool MyApp::OnInit() { + if ( !wxApp::OnInit() ) + return false; + // Create the main frame window frame = new MyFrame((wxFrame *)NULL, wxID_ANY, _T("MDI Demo"), @@ -263,11 +267,6 @@ void MyFrame::OnNewWindow(wxCommandEvent& WXUNUSED(event) ) subframe->SetMenuBar(menu_bar); #endif // wxUSE_MENUS -#if wxUSE_STATUSBAR - subframe->CreateStatusBar(); - subframe->SetStatusText(title); -#endif // wxUSE_STATUSBAR - int width, height; subframe->GetClientSize(&width, &height); MyCanvas *canvas = new MyCanvas(subframe, wxPoint(0, 0), wxSize(width, height)); @@ -517,8 +516,13 @@ void MyChild::OnPaste(wxCommandEvent& WXUNUSED(event)) { wxClipboardLocker lock; wxTextDataObject data; - canvas->SetText(wxTheClipboard->GetData(data) ? data.GetText().c_str() - : _T("No text on clipboard")); + canvas->SetText( + ( + wxTheClipboard->GetData(data) ? + data.GetText() : + wxString("No text on clipboard") + ).c_str() + ); } void MyChild::OnUpdatePaste(wxUpdateUIEvent& event)