]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/spinctrl.cpp
applied patch for compilation with gcc 3.0
[wxWidgets.git] / src / msw / spinctrl.cpp
index 2438d11b7297eb59af20dbaca27d8d78f085cbc1..e4cef9f9ac4ed6ec6661fce486bcd1142686808a 100644 (file)
@@ -98,7 +98,12 @@ LRESULT APIENTRY _EXPORT wxBuddyTextWndProc(HWND hwnd,
             if (!(::IsWindow(hwnd) && ((wxSpinCtrl *)::GetWindowLong(hwnd, GWL_USERDATA)) == spin))
                 return 0;
             break;
+
+        case WM_GETDLGCODE:
+            // we want to get WXK_RETURN in order to generate the event for it
+            return DLGC_WANTCHARS;
     }
+
     return ::CallWindowProc(CASTWNDPROC spin->GetBuddyWndProc(),
                             hwnd, message, wParam, lParam);
 }
@@ -248,7 +253,6 @@ bool wxSpinCtrl::Create(wxWindow *parent,
     if ( style & wxCLIP_SIBLINGS )
         msStyle |= WS_CLIPSIBLINGS;
 
-
     // create the text window
     m_hwndBuddy = (WXHWND)::CreateWindowEx
                     (