X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e0a050e347b1ece07ad5f165ba1b1d16edbeae77..0d29a4828eb4404ac69f29c7d82e2ea3292c6501:/src/msw/slider95.cpp diff --git a/src/msw/slider95.cpp b/src/msw/slider95.cpp index 8bef10518a..1ebdb425dc 100644 --- a/src/msw/slider95.cpp +++ b/src/msw/slider95.cpp @@ -208,17 +208,21 @@ wxSlider::Create(wxWindow *parent, HWND hwndParent = GetHwndOf(parent); for ( size_t n = 0; n < SliderLabel_Last; n++ ) { - (*m_labels)[n] = ::CreateWindow - ( - wxT("STATIC"), - NULL, - WS_CHILD | WS_VISIBLE | SS_CENTER, - 0, 0, 0, 0, - hwndParent, - (HMENU)NewControlId(), - wxGetInstance(), - NULL - ); + wxWindowIDRef lblid = NewControlId(); + + HWND wnd = ::CreateWindow + ( + wxT("STATIC"), + NULL, + WS_CHILD | WS_VISIBLE | SS_CENTER, + 0, 0, 0, 0, + hwndParent, + (HMENU)lblid.GetValue(), + wxGetInstance(), + NULL + ); + + m_labels->Set(n, wnd, lblid); } m_labels->SetFont(GetFont()); @@ -364,13 +368,13 @@ bool wxSlider::MSWOnScroll(int WXUNUSED(orientation), wxScrollEvent event(scrollEvent, m_windowId); event.SetPosition(newPos); event.SetEventObject( this ); - GetEventHandler()->ProcessEvent(event); + HandleWindowEvent(event); wxCommandEvent cevent( wxEVT_COMMAND_SLIDER_UPDATED, GetId() ); cevent.SetInt( newPos ); cevent.SetEventObject( this ); - return GetEventHandler()->ProcessEvent( cevent ); + return HandleWindowEvent( cevent ); } void wxSlider::Command (wxCommandEvent & event)