]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/spinbutt.cpp
Rework the wxCusor ctor taking wx stock number to provide as many cursors as
[wxWidgets.git] / src / msw / spinbutt.cpp
index 43141278d6fbfd16cd23a0426d31ef57a9a094db..4b3f25570c4cfcf3c48306b3d07c0a19fa2cd7b1 100644 (file)
@@ -25,6 +25,7 @@
 #endif
 
 #ifndef WX_PRECOMP
+    #include "wx/msw/wrapcctl.h" // include <commctrl.h> "properly"
     #include "wx/app.h"
 #endif
 
@@ -35,7 +36,6 @@
 IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxNotifyEvent)
 
 #include "wx/msw/private.h"
-#include "wx/msw/wrapcctl.h"
 
 #ifndef UDM_SETRANGE32
     #define UDM_SETRANGE32 (WM_USER+111)
@@ -195,7 +195,7 @@ bool wxSpinButton::Create(wxWindow *parent,
 
     SubclassWin(m_hWnd);
 
-    SetBestSize(size);
+    SetInitialSize(size);
 
     return true;
 }
@@ -256,6 +256,11 @@ void wxSpinButton::SetValue(int val)
     }
 }
 
+void wxSpinButton::NormalizeValue()
+{
+    SetValue( GetValue() );
+}
+
 void wxSpinButton::SetRange(int minVal, int maxVal)
 {
     const bool hadRange = m_min < m_max;