mfc - Set CSliderCtrl to move in 10 unit intervals -
i have csliderctrl
, set this:
m_sliderservertimeout.setrange(10, 600);
i have event handler:
void cothersettingsemailinfopage::onhscroll(uint nsbcode, uint npos, cscrollbar* pscrollbar) { if (pscrollbar->getdlgctrlid() == idc_slider) { updateservertimeoutdescription(); } cmfcpropertypage::onhscroll(nsbcode, npos, pscrollbar); }
works fine want slider move in 10 unit intervals.
how?
update
i tried using setlinesize
, setpagesize
don't apply when slider dragged.
just use slider metric want. use 1/10th in range of values.
m_sliderservertimeout.setrange(1, 60);
and when want use data, scale set value *10.
Comments
Post a Comment