X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/925e9792d32e353233985f53a4845f154e455a58..c12bf40663e0b35d138cc5a48b711a9e23bc08af:/samples/ownerdrw/ownerdrw.cpp diff --git a/samples/ownerdrw/ownerdrw.cpp b/samples/ownerdrw/ownerdrw.cpp index 3824969383..de9d8f4cde 100644 --- a/samples/ownerdrw/ownerdrw.cpp +++ b/samples/ownerdrw/ownerdrw.cpp @@ -40,7 +40,7 @@ class OwnerDrawnFrame : public wxFrame { public: // ctor & dtor - OwnerDrawnFrame(wxFrame *frame, wxChar *title, int x, int y, int w, int h); + OwnerDrawnFrame(wxFrame *frame, const wxChar *title, int x, int y, int w, int h); ~OwnerDrawnFrame(){}; // notifications @@ -70,7 +70,7 @@ enum Menu_Submenu, Menu_Sub1, Menu_Sub2, Menu_Sub3, Menu_Toggle, Menu_About, Control_First = 1000, - Control_Listbox, Control_Listbox2, + Control_Listbox, Control_Listbox2 }; BEGIN_EVENT_TABLE(OwnerDrawnFrame, wxFrame) @@ -83,11 +83,14 @@ BEGIN_EVENT_TABLE(OwnerDrawnFrame, wxFrame) OwnerDrawnFrame::OnListboxDblClick) END_EVENT_TABLE() -IMPLEMENT_APP(OwnerDrawnApp); +IMPLEMENT_APP(OwnerDrawnApp) // init our app: create windows bool OwnerDrawnApp::OnInit(void) { + if ( !wxApp::OnInit() ) + return false; + OwnerDrawnFrame *pFrame = new OwnerDrawnFrame(NULL, _T("wxWidgets Ownerdraw Sample"), 50, 50, 450, 340); @@ -202,7 +205,7 @@ void OwnerDrawnFrame::InitMenu() } // main frame constructor -OwnerDrawnFrame::OwnerDrawnFrame(wxFrame *frame, wxChar *title, +OwnerDrawnFrame::OwnerDrawnFrame(wxFrame *frame, const wxChar *title, int x, int y, int w, int h) : wxFrame(frame, wxID_ANY, title, wxPoint(x, y), wxSize(w, h)) {