]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/slidrmsw.cpp
Added the code to copy setup0.h to setup.h if setup.h does not exist (due to checkout...
[wxWidgets.git] / src / msw / slidrmsw.cpp
index 1bb9b0876d5c4013f5408c9bc5ffe41dd3d67cc9..4050e2c1a41abce91726c57dc51c73890dbaea7f 100644 (file)
@@ -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 );