Lucress Carol
unread,Apr 11, 2012, 7:57:00 AM4/11/12You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hi every one,
I can not figure out how i can increment the value of my slider
control in 0.01 step. What's happening is that the step seems to be
0.08 instead of 0.01
BOOL CTestDlg:: OnInitDialog()
{
...
m_Slider.SetRange(0,1000); // from 0 to 10
m_Slider.SetTicFreq(1);
SetDlgItemText(IDC_SLIDER_VALUE, _T("0"));
}
void CTestDlg:: OnHScroll(UINT nSBCode, UINT nPos, CScrollBar*
pScrollbar)
{
m_SliderValue.Format(_T("%.2f"),(m_Slider.GetPos())*0.01);
SetDlgItemText(IDC_SLIDER_VALUE, m_SliderValue);
}
Could someone tell me what i'm overlooking ?
Thank you