#endif
#ifndef WX_PRECOMP
+ #include "wx/msw/wrapcctl.h" // include <commctrl.h> "properly"
#include "wx/app.h"
#endif
IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxNotifyEvent)
#include "wx/msw/private.h"
-#include "wx/msw/wrapcctl.h"
#ifndef UDM_SETRANGE32
#define UDM_SETRANGE32 (WM_USER+111)
SubclassWin(m_hWnd);
- SetBestSize(size);
+ SetInitialSize(size);
return true;
}
}
}
+void wxSpinButton::NormalizeValue()
+{
+ SetValue( GetValue() );
+}
+
void wxSpinButton::SetRange(int minVal, int maxVal)
{
const bool hadRange = m_min < m_max;
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)
event.SetPosition(lpnmud->iPos + lpnmud->iDelta);
event.SetEventObject(this);
- bool processed = GetEventHandler()->ProcessEvent(event);
+ bool processed = HandleWindowEvent(event);
*result = event.IsAllowed() ? 0 : 1;