]> git.saurik.com Git - wxWidgets.git/commitdiff
char handling fixed again
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 24 Mar 1999 23:40:28 +0000 (23:40 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 24 Mar 1999 23:40:28 +0000 (23:40 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1973 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/window.h
src/msw/textctrl.cpp

index 3e2ac99f30714d5533eb8e3863c056fe61a267a3..9f69b205f02ce2184f1276f898aa0264be38c4d1 100644 (file)
@@ -667,8 +667,8 @@ public:
 
     // These return TRUE if an event handler was found, FALSE otherwise (not processed)
     virtual bool MSWOnChar(WXWORD wParam, WXLPARAM lParam, bool isASCII = FALSE);
-    virtual bool MSWOnKeyDown(WXWORD wParam, WXLPARAM lParam, bool isASCII = FALSE);
-    virtual bool MSWOnKeyUp(WXWORD wParam, WXLPARAM lParam, bool isASCII = FALSE);
+    virtual bool MSWOnKeyDown(WXWORD wParam, WXLPARAM lParam);
+    virtual bool MSWOnKeyUp(WXWORD wParam, WXLPARAM lParam);
 
     virtual bool MSWOnActivate(int flag, bool minimized, WXHWND activate);
     virtual long MSWOnMDIActivate(long flag, WXHWND activate, WXHWND deactivate);
index bfb35eaa50dd0757b10b00cc22ccd5c66ad60f9d..558855f00020b8b50bede7dcfa3d136664766fbb 100644 (file)
@@ -955,6 +955,8 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
 {
     switch( event.KeyCode() )
     {
+        // VZ: commented out until somebody explains to me what it does
+#if 0
         // Fix by Marcel Rasche to allow Alt-Ctrl insertion of special characters
         case '{':
         case '}':
@@ -968,14 +970,10 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
                 WriteText(c);
             }
             break;
+#endif // 0
 
         case WXK_RETURN:
         {
-/* Oh yes it will, because we also specify DLGC_WANTCHARS
-            wxASSERT_MSG( m_windowStyle & wxTE_PROCESS_ENTER,
-                          "this text ctrl should never receive return" );
-*/
-
             if ( (m_windowStyle & wxTE_MULTILINE) == 0 )
             {
                 wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
@@ -987,6 +985,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
 
             break;
         }
+
         case WXK_TAB:
             // only produce navigation event if we don't process TAB ourself or
             // if it's a Shift-Tab keypress (we assume nobody will ever need
@@ -1005,6 +1004,9 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
                     return;
             }
             break;
+
+        default:
+            event.Skip();
     }
     
     // don't just call event.Skip() because this will cause TABs and ENTERs