]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/keyboard/keyboard.cpp
extracted MSW-specific setup.h options to their own wx/msw/setup_inc.h file which...
[wxWidgets.git] / samples / keyboard / keyboard.cpp
index 3b7a8060aa7ce37cf6dea076c056bf1ef88cc2dd..b922d4dc3eaa381c20a713b67f95682a2238dc99 100644 (file)
     #include "wx/wx.h"
 #endif
 
     #include "wx/wx.h"
 #endif
 
+#if !wxUSE_LOG
+#   error You must set wxUSE_LOG to 1 in setup.h
+#endif
+
 // ----------------------------------------------------------------------------
 // private classes
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // private classes
 // ----------------------------------------------------------------------------
@@ -236,6 +240,9 @@ IMPLEMENT_APP(MyApp)
 // 'Main program' equivalent: the program execution "starts" here
 bool MyApp::OnInit()
 {
 // '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));
     // create the main application window
     MyFrame *frame = new MyFrame(_T("Keyboard wxWidgets App"),
                                  wxPoint(50, 50), wxSize(450, 340));
@@ -315,7 +322,7 @@ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
 void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
 {
     wxString msg = _T("Demonstrates keyboard event processing in wxWidgets\n")
 void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
 {
     wxString msg = _T("Demonstrates keyboard event processing in wxWidgets\n")
-                   _T("© 2002 Vadim Zeitlin");
+                   _T("(c) 2002 Vadim Zeitlin");
 
     wxMessageBox(msg, _T("About wxKeyboard"), wxOK | wxICON_INFORMATION, this);
 }
 
     wxMessageBox(msg, _T("About wxKeyboard"), wxOK | wxICON_INFORMATION, this);
 }
@@ -373,8 +380,6 @@ void TextWindow::LogEvent(const wxChar *name, wxKeyEvent& event)
         case WXK_MENU: key = _T("MENU"); break;
         case WXK_PAUSE: key = _T("PAUSE"); break;
         case WXK_CAPITAL: key = _T("CAPITAL"); break;
         case WXK_MENU: key = _T("MENU"); break;
         case WXK_PAUSE: key = _T("PAUSE"); break;
         case WXK_CAPITAL: key = _T("CAPITAL"); break;
-        case WXK_PRIOR: key = _T("PRIOR"); break;
-        case WXK_NEXT: key = _T("NEXT"); break;
         case WXK_END: key = _T("END"); break;
         case WXK_HOME: key = _T("HOME"); break;
         case WXK_LEFT: key = _T("LEFT"); break;
         case WXK_END: key = _T("END"); break;
         case WXK_HOME: key = _T("HOME"); break;
         case WXK_LEFT: key = _T("LEFT"); break;
@@ -443,7 +448,6 @@ void TextWindow::LogEvent(const wxChar *name, wxKeyEvent& event)
         case WXK_NUMPAD_UP: key = _T("NUMPAD_UP"); break;
         case WXK_NUMPAD_RIGHT: key = _T("NUMPAD_RIGHT"); break;
         case WXK_NUMPAD_DOWN: key = _T("NUMPAD_DOWN"); break;
         case WXK_NUMPAD_UP: key = _T("NUMPAD_UP"); break;
         case WXK_NUMPAD_RIGHT: key = _T("NUMPAD_RIGHT"); break;
         case WXK_NUMPAD_DOWN: key = _T("NUMPAD_DOWN"); break;
-        case WXK_NUMPAD_PRIOR: key = _T("NUMPAD_PRIOR"); break;
         case WXK_NUMPAD_PAGEUP: key = _T("NUMPAD_PAGEUP"); break;
         case WXK_NUMPAD_PAGEDOWN: key = _T("NUMPAD_PAGEDOWN"); break;
         case WXK_NUMPAD_END: key = _T("NUMPAD_END"); break;
         case WXK_NUMPAD_PAGEUP: key = _T("NUMPAD_PAGEUP"); break;
         case WXK_NUMPAD_PAGEDOWN: key = _T("NUMPAD_PAGEDOWN"); break;
         case WXK_NUMPAD_END: key = _T("NUMPAD_END"); break;