X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/16553659df1a8fee8b19cc9a8ff8321711fe983c..fae05df5a988883e9c6683ccded766dfb7b84b1b:/samples/forty/scoredg.cpp diff --git a/samples/forty/scoredg.cpp b/samples/forty/scoredg.cpp index befb3725cd..de7d7a6a09 100644 --- a/samples/forty/scoredg.cpp +++ b/samples/forty/scoredg.cpp @@ -137,6 +137,9 @@ void ScoreCanvas::OnDraw(wxDC& dc) } } +BEGIN_EVENT_TABLE(ScoreDialog, wxDialog) + EVT_CLOSE(ScoreDialog::OnCloseWindow) +END_EVENT_TABLE() ScoreDialog::ScoreDialog( wxWindow* parent, @@ -183,10 +186,7 @@ void ScoreDialog::Display() Show(TRUE); } -bool ScoreDialog::OnClose() +void ScoreDialog::OnCloseWindow(wxCloseEvent& event) { - // hide the dialog - // NB don't return TRUE otherwise delete is called - Show(FALSE); - return FALSE; + EndModal(wxID_OK); }