]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/toolbar/toolbar.cpp
changes wxDirExists() to accept wxString instead of wxChar*, so that it can be used...
[wxWidgets.git] / samples / toolbar / toolbar.cpp
index 513f5bc9ad558f00f2f28e8ae7dfc87c6d905c76..8812040c032ee195a6fb6e0e6dde8ca711b758e0 100644 (file)
@@ -269,6 +269,9 @@ IMPLEMENT_APP(MyApp)
 // main frame
 bool MyApp::OnInit()
 {
+    if ( !wxApp::OnInit() )
+        return false;
+
     // Create the main frame window
     MyFrame* frame = new MyFrame((wxFrame *) NULL, wxID_ANY,
                                  _T("wxToolBar Sample"),
@@ -583,19 +586,6 @@ MyFrame::MyFrame(wxFrame* parent,
     m_textWindow = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE);
 }
 
-#if USE_GENERIC_TBAR
-
-wxToolBar* MyFrame::OnCreateToolBar(long style,
-                                    wxWindowID id,
-                                    const wxString& name)
-{
-    return (wxToolBar *)new wxToolBarSimple(this, id,
-                                            wxDefaultPosition, wxDefaultSize,
-                                            style, name);
-}
-
-#endif // USE_GENERIC_TBAR
-
 void MyFrame::LayoutChildren()
 {
     wxSize size = GetClientSize();