home Tech Library Tech Forum
Publisher
 
Custom Controls in MFC       
 
 
Slider Controls and Styles
 
 

 

A slider control, also known as a trackbar, contains a slider that the user moves with either the mouse or the direction keys. The control sends notification messages indicating the change. Slider controls can be used to select a discrete value or a set of consecutive values in a range.
In addition to the window styles that apply to the common controls, there are styles specific to each new common control.
 
Slider Control Styles
TBS_HORIZ Orients the slider horizontally (default style).
TBS_VERT Orients the slider vertically.
TBS_NOTICKS Displays a slider without tick marks.
TBS_ENABLESELRANGE Displays a selection range. When a slider has this style, the tick marks at the starting and ending positions of a selection range are displayed as triangles (instead of vertical dashes) and the selection range is highlighted.
TBS_AUTOTICKS Displays a slider with a tick mark for each increment in its range of values; marks are added automatically when SetRange() is called.
TBS_BOTH Displays tick marks on both sides of the slider.
TBS_TOP Displays tick marks on top of a horizontal slider.
TBS_BOTTOM Displays tick marks on bottom of a horizontal slider.
TBS_RIGHT Displays tick marks on the right of a vertical slider.
TBS_LEFT Displays tick marks on the left of a vertical slider.
   
   
   
  RELATED TOPICS  
Custom Controls in MFC
SubClassing a Window
Common Custom Controls in MFC
Creating the Common Controls
Spin Control and Styles
List View Control and Styles
Tree View Control and Styles
Notification Messages by Common Controls
Property Sheets
How to create a Modal Property Sheet
 


 
           
Home | Profile | Users | Library | Publisher | Tech Forum | News | Contact Us