]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/slider95.cpp
1. added wxEvtHandler::SafelyProcessEvent() and wxWindow::HandleWindowEvent() to...
[wxWidgets.git] / src / msw / slider95.cpp
index 2a9a6905775ba474db4ad2ed3e40b55e329697b1..3a0dbfb80ea7874f44aac6bf8418b8f0319386ea 100644 (file)
 
 #if wxUSE_SLIDER
 
+#include "wx/slider.h"
+
 #ifndef WX_PRECOMP
+    #include "wx/msw/wrapcctl.h" // include <commctrl.h> "properly"
     #include "wx/brush.h"
 #endif
 
-#include "wx/slider.h"
 #include "wx/msw/subwin.h"
 
-// include <commctrl.h> "properly"
-#include "wx/msw/wrapcctl.h"
-
 // ----------------------------------------------------------------------------
 // constants
 // ----------------------------------------------------------------------------
@@ -365,13 +364,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)
@@ -574,7 +573,7 @@ void wxSlider::SetValue(int value)
 
     if ( m_labels )
     {
-        ::SetWindowText((*m_labels)[SliderLabel_Value], Format(value));
+        ::SetWindowText((*m_labels)[SliderLabel_Value], Format(value).wx_str());
     }
 }
 
@@ -588,8 +587,10 @@ void wxSlider::SetRange(int minValue, int maxValue)
 
     if ( m_labels )
     {
-        ::SetWindowText((*m_labels)[SliderLabel_Min], Format(ValueInvertOrNot(m_rangeMin)));
-        ::SetWindowText((*m_labels)[SliderLabel_Max], Format(ValueInvertOrNot(m_rangeMax)));
+        ::SetWindowText((*m_labels)[SliderLabel_Min],
+                        Format(ValueInvertOrNot(m_rangeMin)).wx_str());
+        ::SetWindowText((*m_labels)[SliderLabel_Max],
+                        Format(ValueInvertOrNot(m_rangeMax)).wx_str());
     }
 }