From 6b1a022253a5ff031be99d8cfcdf52e3851caec9 Mon Sep 17 00:00:00 2001
From: Robert Roebling <robert@roebling.de>
Date: Sat, 14 Nov 2009 14:26:54 +0000
Subject: [PATCH] Simple implementation of wxSL_MIN_MAX_LABELS and
 wxSL_VALUE_LABEL for MSW

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62638 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 src/msw/slider.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/msw/slider.cpp b/src/msw/slider.cpp
index 275f2bb909..62643ec986 100644
--- a/src/msw/slider.cpp
+++ b/src/msw/slider.cpp
@@ -575,7 +575,7 @@ void wxSlider::SetValue(int value)
 {
     ::SendMessage(GetHwnd(), TBM_SETPOS, (WPARAM)TRUE, (LPARAM)ValueInvertOrNot(value));
 
-    if ( m_labels )
+    if ( HasFlag(wxSL_VALUE_LABEL) )
     {
         ::SetWindowText((*m_labels)[SliderLabel_Value], Format(value).wx_str());
     }
@@ -589,7 +589,7 @@ void wxSlider::SetRange(int minValue, int maxValue)
     ::SendMessage(GetHwnd(), TBM_SETRANGEMIN, TRUE, m_rangeMin);
     ::SendMessage(GetHwnd(), TBM_SETRANGEMAX, TRUE, m_rangeMax);
 
-    if ( m_labels )
+    if ( HasFlag(wxSL_MIN_MAX_LABELS) )
     {
         ::SetWindowText((*m_labels)[SliderLabel_Min],
                         Format(ValueInvertOrNot(m_rangeMin)).wx_str());
-- 
2.49.0