X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/57bd4c6031d438f11af0ec540136f49a928b923c..b5aaf62e977b828214d65c3712478410fb2c8a05:/src/msw/spinbutt.cpp?ds=inline diff --git a/src/msw/spinbutt.cpp b/src/msw/spinbutt.cpp index d4e20e76a5..1695f13436 100644 --- a/src/msw/spinbutt.cpp +++ b/src/msw/spinbutt.cpp @@ -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; @@ -303,7 +308,7 @@ bool wxSpinButton::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam, event.SetPosition((short)pos); // cast is important for negative values! event.SetEventObject(this); - return GetEventHandler()->ProcessEvent(event); + return HandleWindowEvent(event); } bool wxSpinButton::MSWOnNotify(int WXUNUSED(idCtrl), WXLPARAM lParam, WXLPARAM *result) @@ -319,7 +324,7 @@ bool wxSpinButton::MSWOnNotify(int WXUNUSED(idCtrl), WXLPARAM lParam, WXLPARAM * event.SetPosition(lpnmud->iPos + lpnmud->iDelta); event.SetEventObject(this); - bool processed = GetEventHandler()->ProcessEvent(event); + bool processed = HandleWindowEvent(event); *result = event.IsAllowed() ? 0 : 1;