]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/slider95.cpp
fixed wxListCtrl::EditLabel for MSW (ListView_EditLabel fails if
[wxWidgets.git] / src / msw / slider95.cpp
index ef1e073fbf53b07de2b3eae4e8176eb049fff215..77cf291c9fd46be3ff56a10f75667af3e8c5f51f 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     04/01/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart and Markus Holzem
 // Created:     04/01/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart and Markus Holzem
-// Licence:       wxWindows license
+// Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
@@ -31,8 +31,8 @@
 #include "wx/msw/slider95.h"
 #include "wx/msw/private.h"
 
 #include "wx/msw/slider95.h"
 #include "wx/msw/private.h"
 
-#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__) || defined(wxUSE_NORLANDER_HEADERS)
-#include <commctrl.h>
+#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) || defined(__TWIN32__))
+    #include <commctrl.h>
 #endif
 
 IMPLEMENT_DYNAMIC_CLASS(wxSlider95, wxControl)
 #endif
 
 IMPLEMENT_DYNAMIC_CLASS(wxSlider95, wxControl)
@@ -58,7 +58,9 @@ bool wxSlider95::Create(wxWindow *parent, wxWindowID id,
            const wxString& name)
 {
   SetName(name);
            const wxString& name)
 {
   SetName(name);
+#if wxUSE_VALIDATORS
   SetValidator(validator);
   SetValidator(validator);
+#endif // wxUSE_VALIDATORS
 
   if (parent) parent->AddChild(this);
   SetBackgroundColour(parent->GetBackgroundColour()) ;
 
   if (parent) parent->AddChild(this);
   SetBackgroundColour(parent->GetBackgroundColour()) ;
@@ -258,6 +260,7 @@ bool wxSlider95::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam,
     GetEventHandler()->ProcessEvent(event);
 
     wxCommandEvent cevent( wxEVT_COMMAND_SLIDER_UPDATED, GetId() );
     GetEventHandler()->ProcessEvent(event);
 
     wxCommandEvent cevent( wxEVT_COMMAND_SLIDER_UPDATED, GetId() );
+    cevent.SetInt( newPos );
     cevent.SetEventObject( this );
 
     return GetEventHandler()->ProcessEvent( cevent );
     cevent.SetEventObject( this );
 
     return GetEventHandler()->ProcessEvent( cevent );