]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/slider95.cpp
Patch [ 1816051 ] MSW DrawEllipticArc inconsistent with other platforms
[wxWidgets.git] / src / msw / slider95.cpp
index 193017c84ab3678af047944e2fd083aca2703b74..8bef10518a09d89900eae6a4d57d6d3329c61b9f 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        msw/slider.cpp
+// Name:        src/msw/slider.cpp
 // Purpose:     wxSlider, using the Win95 (and later) trackbar control
 // Author:      Julian Smart
 // Modified by:
 
 #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"
 
-#if !(defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__))
-    #include <commctrl.h>
-#endif
-
 // ----------------------------------------------------------------------------
 // constants
 // ----------------------------------------------------------------------------
@@ -103,7 +101,7 @@ wxBEGIN_FLAGS( wxSliderStyle )
 
 wxEND_FLAGS( wxSliderStyle )
 
-IMPLEMENT_DYNAMIC_CLASS_XTI(wxSlider, wxControl,"wx/scrolbar.h")
+IMPLEMENT_DYNAMIC_CLASS_XTI(wxSlider, wxControl,"wx/slider.h")
 
 wxBEGIN_PROPERTIES_TABLE(wxSlider)
     wxEVENT_RANGE_PROPERTY( Scroll , wxEVT_SCROLL_TOP , wxEVT_SCROLL_CHANGED , wxScrollEvent )
@@ -575,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());
     }
 }
 
@@ -589,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());
     }
 }