X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ce96b7a010101e59a1a1c5b63fae52fb8231f367..2d19ad25782b1b370cd26d0f17d45856d201fc70:/src/msw/slidrmsw.cpp diff --git a/src/msw/slidrmsw.cpp b/src/msw/slidrmsw.cpp index 1bb9b0876d..4050e2c1a4 100644 --- a/src/msw/slidrmsw.cpp +++ b/src/msw/slidrmsw.cpp @@ -52,7 +52,9 @@ bool wxSliderMSW::Create(wxWindow *parent, wxWindowID id, const wxString& name) { SetName(name); +#if wxUSE_VALIDATORS SetValidator(validator); +#endif // wxUSE_VALIDATORS if (parent) parent->AddChild(this); SetBackgroundColour(parent->GetBackgroundColour()) ; @@ -95,9 +97,6 @@ bool wxSliderMSW::Create(wxWindow *parent, wxWindowID id, 0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)NewControlId(), wxGetInstance(), NULL); - // Now create slider - m_windowId = (int)NewControlId(); - msStyle = 0; if (m_windowStyle & wxSL_VERTICAL) msStyle = SBS_VERT | WS_CHILD | WS_VISIBLE | WS_TABSTOP ; @@ -229,6 +228,7 @@ bool wxSliderMSW::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam, GetEventHandler()->ProcessEvent(event); wxCommandEvent cevent( wxEVT_COMMAND_SLIDER_UPDATED, GetId() ); + cevent.SetInt( newPos ); cevent.SetEventObject( this ); return GetEventHandler()->ProcessEvent( cevent );