void SetValue(T v) { if (v < m_pSlider->GetRangeMin()) { printf("?\n"); } if (v > m_pSlider->GetRangeMax()) { printf("?\n"); } m_pSlider->SetValue(v,true); (*m_targetValue) = v; float val = float(v);//todo: specialize on template type char txt[1024]; sprintf(txt,"%s : %.3f", m_variableName,val); m_label->SetText(txt); }