]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/slider95.cpp
wxEVT_COMMAND_CHOICE_SELECTED => wxEVT_COMMAND_COMBOBOX_SELECTED
[wxWidgets.git] / src / msw / slider95.cpp
index f572ef6eebf6be335570bd38f5ab609bc23873c1..6981d0a1b09df8eabd119e0cb35ba23e487d5b83 100644 (file)
 #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__)
+#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__)
 #include <commctrl.h>
 #endif
 
 #if !USE_SHARED_LIBRARY
 IMPLEMENT_DYNAMIC_CLASS(wxSlider95, wxControl)
 #include <commctrl.h>
 #endif
 
 #if !USE_SHARED_LIBRARY
 IMPLEMENT_DYNAMIC_CLASS(wxSlider95, wxControl)
-
-BEGIN_EVENT_TABLE(wxSlider95, wxControl)
-#if WXWIN_COMPATIBILITY
-  EVT_SCROLL(wxSlider95::OnScroll)
-#endif
-END_EVENT_TABLE()
-
 #endif
 
 // Slider
 #endif
 
 // Slider
@@ -257,6 +250,11 @@ void wxSlider95::MSWOnVScroll(WXWORD wParam, WXWORD pos, WXHWND control)
         event.SetPosition(newPos);
         event.SetEventObject( this );
         GetEventHandler()->ProcessEvent(event);
         event.SetPosition(newPos);
         event.SetEventObject( this );
         GetEventHandler()->ProcessEvent(event);
+
+        wxCommandEvent cevent( wxEVT_COMMAND_SLIDER_UPDATED, GetId() );
+        cevent.SetEventObject( this );
+        GetEventHandler()->ProcessEvent( cevent );
+
       }
     }
 }
       }
     }
 }
@@ -616,21 +614,6 @@ bool wxSlider95::ContainsHWND(WXHWND hWnd) const
        return ( hWnd == GetStaticMin() || hWnd == GetStaticMax() || hWnd == GetEditValue() );
 }
 
        return ( hWnd == GetStaticMin() || hWnd == GetStaticMax() || hWnd == GetEditValue() );
 }
 
-#if WXWIN_COMPATIBILITY
-// Backward compatibility
-void wxSlider95::OnScroll(wxScrollEvent& event)
-{
-    wxEventType oldEvent = event.GetEventType();
-    event.SetEventType( wxEVT_COMMAND_SLIDER_UPDATED );
-    if ( !GetEventHandler()->ProcessEvent(event) )
-    {
-        event.SetEventType( oldEvent );
-        if (!GetParent()->GetEventHandler()->ProcessEvent(event))
-            event.Skip();
-    }
-}
-#endif
-
 void wxSlider95::Command (wxCommandEvent & event)
 {
   SetValue (event.GetInt());
 void wxSlider95::Command (wxCommandEvent & event)
 {
   SetValue (event.GetInt());