]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/spinctrl.cpp
added (wxMSW-only) wxToolTip::SetMaxWidth() and improve its default behaviour (#2817)
[wxWidgets.git] / src / msw / spinctrl.cpp
index 20df40a30e236828bde5e9fd358ff9d04f9f4b49..05965d0c3d7d377a6b7df701ca19c5238a36aa6c 100644 (file)
@@ -175,8 +175,20 @@ LRESULT APIENTRY _EXPORT wxBuddyTextWndProc(HWND hwnd,
             break;
 
         case WM_GETDLGCODE:
-            // we want to get WXK_RETURN in order to generate the event for it
-            return DLGC_WANTALLKEYS;
+            if ( spin->HasFlag(wxTE_PROCESS_ENTER) )
+            {
+                long dlgCode = ::CallWindowProc
+                                 (
+                                    CASTWNDPROC spin->GetBuddyWndProc(),
+                                    hwnd,
+                                    message,
+                                    wParam,
+                                    lParam
+                                 );
+                dlgCode |= DLGC_WANTMESSAGE;
+                return dlgCode;
+            }
+            break;
     }
 
     return ::CallWindowProc(CASTWNDPROC spin->GetBuddyWndProc(),