CSliderCtrl Class
Provides the functionality of the Windows common slider control.
class CSliderCtrl : public CWnd
Members
Public Constructors
Name |
Description |
---|---|
Constructs a CSliderCtrl object. |
Public Methods
Name |
Description |
---|---|
Clears the current selection in a slider control. |
|
Removes the current tick marks from a slider control. |
|
Creates a slider control and attaches it to a CSliderCtrl object. |
|
Creates a slider control with the specified Windows extended styles and attaches it to a CSliderCtrl object. |
|
Retrieves the handle to a slider control buddy window at a given location. |
|
Retrieves the size of the slider control's channel. |
|
Retrieves the line size of a slider control. |
|
Retrieves the number of tick marks in a slider control. |
|
Retrieves the page size of a slider control. |
|
Retrieves the current position of the slider. |
|
Retrieves the minimum and maximum positions for a slider. |
|
Retrieves the maximum position for a slider. |
|
Retrieves the minimum position for a slider. |
|
Retrieves the range of the current selection. |
|
Retrieves the length of the slider in the current trackbar control. |
|
Retrieves the size of the slider control's thumb. |
|
Retrieves the position of the specified tick mark. |
|
Retrieves the array of tick mark positions for a slider control. |
|
Retrieves the position of the specified tick mark, in client coordinates. |
|
Retrieves the handle to the tooltip control assigned to the slider control, if any. |
|
Assigns a window as the buddy window for a slider control. |
|
Sets the line size of a slider control. |
|
Sets the page size of a slider control. |
|
Sets the current position of the slider. |
|
Sets the minimum and maximum positions for a slider. |
|
Sets the maximum position for a slider. |
|
Sets the minimum position for a slider. |
|
Sets the range of the current selection. |
|
Sets the length of the slider in the current trackbar control. |
|
Sets the position of the specified tick mark. |
|
Sets the frequency of tick marks per slider control increment. |
|
Positions a tooltip control used by a trackbar control. |
|
Assigns a tooltip control to a slider control. |
Remarks
A "slider control" (also known as a trackbar) is a window containing a slider and optional tick marks. When the user moves the slider, using either the mouse or the direction keys, the control sends notification messages to indicate the change.
Slider controls are useful when you want the user to select a discrete value or a set of consecutive values in a range. For example, you might use a slider control to allow the user to set the repeat rate of the keyboard by moving the slider to a given tick mark.
This control (and therefore the CSliderCtrl class) is available only to programs running under Windows 95/98 and Windows NT version 3.51 and later.
The slider moves in increments that you specify when you create it. For example, if you specify that the slider should have a range of five, the slider can only occupy six positions: a position at the left side of the slider control and one position for each increment in the range. Typically, each of these positions is identified by a tick mark.
You create a slider by using the constructor and the Create member function of CSliderCtrl. Once you have created a slider control, you can use member functions in CSliderCtrl to change many of its properties. Changes that you can make include setting the minimum and maximum positions for the slider, drawing tick marks, setting a selection range, and repositioning the slider.
For more information on using CSliderCtrl, see Controls and Using CSliderCtrl.
Inheritance Hierarchy
CSliderCtrl
Requirements
Header: afxcmn.h