X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/277956850e9abb6488b902c4779c02337b07eb61..a0fef35d6bd0505df5d3337a4357d6c867177d35:/samples/keyboard/keyboard.cpp diff --git a/samples/keyboard/keyboard.cpp b/samples/keyboard/keyboard.cpp index 813b93da6e..a5d356a67c 100644 --- a/samples/keyboard/keyboard.cpp +++ b/samples/keyboard/keyboard.cpp @@ -98,7 +98,7 @@ public: private: // implement sink functions - virtual void DoLog(wxLogLevel level, const wxChar *szString, time_t t) + virtual void DoLog(wxLogLevel level, const wxString& szString, time_t t) { // don't put trace messages into listbox or we can get into infinite // recursion @@ -162,6 +162,11 @@ protected: { wxPaintDC dc(this); dc.SetTextForeground(*wxWHITE); + wxFont font(*wxSWISS_FONT); + font.SetWeight(wxFONTWEIGHT_BOLD); + font.SetPointSize(font.GetPointSize() + 2); + dc.SetFont(font); + dc.DrawLabel(_T("Press keys here"), GetClientRect(), wxALIGN_CENTER); } @@ -240,6 +245,9 @@ IMPLEMENT_APP(MyApp) // 'Main program' equivalent: the program execution "starts" here bool MyApp::OnInit() { + if ( !wxApp::OnInit() ) + return false; + // create the main application window MyFrame *frame = new MyFrame(_T("Keyboard wxWidgets App"), wxPoint(50, 50), wxSize(450, 340));