X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1d5b7a0be4977b291d37d582717d99d7afd24f33..e564aa153eb1dc5ebd9f8c9f5f055c2a49c15b05:/samples/resource/resource.cpp diff --git a/samples/resource/resource.cpp b/samples/resource/resource.cpp index 836cf563a4..807c387fa1 100644 --- a/samples/resource/resource.cpp +++ b/samples/resource/resource.cpp @@ -6,7 +6,7 @@ // Created: 04/01/98 // RCS-ID: $Id$ // Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ @@ -113,12 +113,14 @@ bool MyApp::OnInit(void) MyApp::~MyApp() { +#if defined(__WXMSW__) delete dialog1; delete menu1; +#endif } BEGIN_EVENT_TABLE(MyPanel, wxPanel) - EVT_LEFT_DOWN( MyPanel::OnClick) + EVT_LEFT_DOWN( MyPanel::OnClick) END_EVENT_TABLE() MyPanel::MyPanel( wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, @@ -136,9 +138,9 @@ void MyPanel::OnClick( wxMouseEvent &WXUNUSED(event2) ) BEGIN_EVENT_TABLE(MyFrame, wxFrame) - EVT_MENU(RESOURCE_ABOUT, MyFrame::OnAbout) - EVT_MENU(RESOURCE_QUIT, MyFrame::OnQuit) - EVT_MENU(RESOURCE_TESTDIALOG, MyFrame::OnTestDialog) + EVT_MENU(RESOURCE_ABOUT, MyFrame::OnAbout) + EVT_MENU(RESOURCE_QUIT, MyFrame::OnQuit) + EVT_MENU(RESOURCE_TESTDIALOG, MyFrame::OnTestDialog) END_EVENT_TABLE() // Define my frame constructor @@ -157,7 +159,7 @@ void MyFrame::OnAbout( wxCommandEvent& WXUNUSED(event) ) void MyFrame::OnQuit( wxCommandEvent& WXUNUSED(event) ) { - Close(TRUE); + Close(TRUE); } void MyFrame::OnTestDialog(wxCommandEvent& WXUNUSED(event) ) @@ -173,16 +175,9 @@ void MyFrame::OnTestDialog(wxCommandEvent& WXUNUSED(event) ) dialog->Close(TRUE); } -bool MyFrame::OnClose(void) -{ - Show(FALSE); - - return TRUE; -} - BEGIN_EVENT_TABLE(MyDialog, wxDialog) - // EVT_BUTTON(RESOURCE_OK, MyDialog::OnOk) - EVT_BUTTON(ID_BUTTON109, MyDialog::OnCancel) + //EVT_BUTTON(RESOURCE_OK, MyDialog::OnOk) + EVT_BUTTON(ID_BUTTON109, MyDialog::OnCancel) END_EVENT_TABLE()