Here's an example of this kind of thing in action :
A smart edit and linked slider control[
^].
The key thing is to service movement of the slider in the
OnVScroll
or
OnHScroll
message handler methods, depending on the orientation of your control. To set this up, define minimum and maximum values for the slider and then you have to translate a slider position to the appropriate value for your program. In the article linked, written by me incidentally, an edit box and a slider control are linked together so changing the slider sets the value in the edit control correspondingly. You may not need that functionality but the point is it demonstrates how to handle messages for movement of the slider.