X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4235f9f6c601cae95fc74a663b1dc47c40c21582..e83c4d401206ff9d5568f03ade6d9713c57bdd51:/src/msw/slider.cpp diff --git a/src/msw/slider.cpp b/src/msw/slider.cpp index 747d5e309b..1b87047ed2 100644 --- a/src/msw/slider.cpp +++ b/src/msw/slider.cpp @@ -175,7 +175,7 @@ bool wxSlider::Create(wxWindow *parent, // and initialize everything SetRange(minValue, maxValue); SetValue(value); - SetPageSize((maxValue - minValue)/10); + SetPageSize( wxMax(1, (maxValue - minValue)/10) ); // we need to position the labels correctly if we have them and if // SetSize() hadn't been called before (when best size was determined by @@ -583,7 +583,7 @@ void wxSlider::SetValue(int value) if ( m_labels ) { - ::SetWindowText((*m_labels)[SliderLabel_Value], Format(value).wx_str()); + ::SetWindowText((*m_labels)[SliderLabel_Value], Format(value).t_str()); } } @@ -603,9 +603,9 @@ void wxSlider::SetRange(int minValue, int maxValue) if ( m_labels ) { ::SetWindowText((*m_labels)[SliderLabel_Min], - Format(ValueInvertOrNot(m_rangeMin)).wx_str()); + Format(ValueInvertOrNot(m_rangeMin)).t_str()); ::SetWindowText((*m_labels)[SliderLabel_Max], - Format(ValueInvertOrNot(m_rangeMax)).wx_str()); + Format(ValueInvertOrNot(m_rangeMax)).t_str()); } // When emulating wxSL_INVERSE style in wxWidgets, we need to update the