X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8f0c8a80937fbaf593b09c60e2ad73f3e914f618..0828c0875e1516e4bfc0aa5b0a84195a2ac92cca:/samples/forty/scoredg.cpp?ds=inline diff --git a/samples/forty/scoredg.cpp b/samples/forty/scoredg.cpp index 773b513616..de7d7a6a09 100644 --- a/samples/forty/scoredg.cpp +++ b/samples/forty/scoredg.cpp @@ -28,7 +28,7 @@ #endif #if wxUSE_IOSTREAMH -#if defined(__WXMSW__) && !defined(GNUWIN32) +#if defined(__WXMSW__) && !defined(__GNUWIN32__) #include #else #include @@ -96,7 +96,7 @@ ScoreCanvas::~ScoreCanvas() void ScoreCanvas::OnDraw(wxDC& dc) { - dc.SetFont(m_font); + dc.SetFont(* m_font); const char* str = m_text; unsigned int tab = 0; @@ -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); }