From: Vadim Zeitlin Date: Tue, 11 Aug 1998 12:44:33 +0000 (+0000) Subject: controls.cpp didn't compile - missing MyTextCtrl declaration added (and what X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/654c1d6b7b9fb89990ed1613bf005d374ed80dd9?ds=inline controls.cpp didn't compile - missing MyTextCtrl declaration added (and what OnRightButton is supposed to do?) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@502 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/samples/controls/controls.cpp b/samples/controls/controls.cpp index bd57a74f0a..cbc9cecf82 100644 --- a/samples/controls/controls.cpp +++ b/samples/controls/controls.cpp @@ -127,8 +127,19 @@ bool MyApp::OnInit(void) // MyTextCtrl //---------------------------------------------------------------------- +class MyTextCtrl : public wxTextCtrl +{ +public: + MyTextCtrl( wxWindow *parent, wxWindowID id, const wxString &value, + const wxPoint &pos, const wxSize &size, int style ); + + void OnRightButton(wxCommandEvent&) { } + +DECLARE_EVENT_TABLE() +}; + BEGIN_EVENT_TABLE(MyTextCtrl, wxTextCtrl) - EVT_RIGHT_DOWN (MyTextCtrl::OnRightButton) + EVT_RIGHT_DOWN(MyTextCtrl::OnRightButton) END_EVENT_TABLE() MyTextCtrl::MyTextCtrl( wxWindow *parent, wxWindowID id, const wxString &value, @@ -386,7 +397,7 @@ END_EVENT_TABLE() MyFrame::MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h): wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h)) { - (void*) new MyPanel( this, 10, 10, 300, 100 ); + (void)new MyPanel( this, 10, 10, 300, 100 ); } void MyFrame::OnQuit (wxCommandEvent& WXUNUSED(event) )