Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Stop slider from jumping

I would like to stop the pointer of a CNiSlider from jumping to the cursor when I click on the slider.
Is there a property I can set for this like m_SliderCtrl.SetPageSize( 0 );
for the MFC CSliderCtrl class?

Do I have to go in and overide mouse events?

matthew
0 Kudos
Message 1 of 3
(2,873 Views)
Hello

If you want to prevent the slider pointer from jumping on a mouse click, but you still want the user to be able to drag the slier around, you should change the mode of the pointer to PointerModeControlSmooth. If you are using CNi objects (instead of the class wizard wrappers), you would do the following:

m_slidetest.Pointers.Item(1).SetMode(CNiPointer::PointerModes(5))

Check out the help for CWPointer for more details on the various modes and what they mean.

Thanks

Bilal Durrani
NI
Bilal Durrani
NI
Message 2 of 3
(2,873 Views)
Thanks, perfect
0 Kudos
Message 3 of 3
(2,873 Views)