]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/spinctrl.cpp
corrected use of Print Manager Session APIs for Carbon targets
[wxWidgets.git] / src / msw / spinctrl.cpp
index f41eb5d32d1cb7e549ef3308b41278f0f7ee5b8c..b06ff27e385b5be01003d16f5d76df2f4fca6a68 100644 (file)
@@ -40,7 +40,7 @@
 #include "wx/spinctrl.h"
 #include "wx/msw/private.h"
 
 #include "wx/spinctrl.h"
 #include "wx/msw/private.h"
 
-#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) || defined(__TWIN32__))
+#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__))
     #include <commctrl.h>
 #endif
 
     #include <commctrl.h>
 #endif
 
@@ -98,7 +98,12 @@ LRESULT APIENTRY _EXPORT wxBuddyTextWndProc(HWND hwnd,
             if (!(::IsWindow(hwnd) && ((wxSpinCtrl *)::GetWindowLong(hwnd, GWL_USERDATA)) == spin))
                 return 0;
             break;
             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);
 }
     return ::CallWindowProc(CASTWNDPROC spin->GetBuddyWndProc(),
                             hwnd, message, wParam, lParam);
 }
@@ -245,6 +250,9 @@ bool wxSpinCtrl::Create(wxWindow *parent,
     if ( want3D || wxStyleHasBorder(style) )
         msStyle |= WS_BORDER;
 
     if ( want3D || wxStyleHasBorder(style) )
         msStyle |= WS_BORDER;
 
+    if ( style & wxCLIP_SIBLINGS )
+        msStyle |= WS_CLIPSIBLINGS;
+
     // create the text window
     m_hwndBuddy = (WXHWND)::CreateWindowEx
                     (
     // create the text window
     m_hwndBuddy = (WXHWND)::CreateWindowEx
                     (