X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/932324990328613e69526cb88e587de4024061c3..69659fd770f615210efac4b4fa741b3ad6223616:/src/msw/spinbutt.cpp diff --git a/src/msw/spinbutt.cpp b/src/msw/spinbutt.cpp index 43141278d6..4b3f25570c 100644 --- a/src/msw/spinbutt.cpp +++ b/src/msw/spinbutt.cpp @@ -25,6 +25,7 @@ #endif #ifndef WX_PRECOMP + #include "wx/msw/wrapcctl.h" // include "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;