CSlider

Win32++

CSlider Class

Description

The CSlider class is used to create and manage a slider control.

CSlider Members

CSlider
CSlider();
Constructor for the CSlider.
ClearSel
void ClearSel() const;
Clears the current selection range ClearTics
void ClearTics(BOOL bRedraw = FALSE ) const;
Removes the current tick marks GetBuddy
HWND GetBuddy(BOOL fLocation = TRUE ) const;
Retrieves the handle to the trackbar control buddy window at the given location. GetChannelRect
CRect GetChannelRect() const;
Retrieves the size and position of the bounding rectangle fro the trackbar's channel. GetLineSize
int GetLineSize() const;
Retrieves the number of logical positions the trackbar's slide moves in response to keyboard input from the arrow keys. GetNumTics
int GetNumTics() const;
Retrieves the number of tick marks in the trackbar. GetPageSize
int GetPageSize() const;
Retrieve the number of logical positions the trackbar's slider move in response to keyboard input, or mouse input such as clicks in the trackbar's channel. GetPos
int GetPos() const;
Retrieves the current logical position of the slider in the trackbar. GetRangeMax
int GetRangeMax() const;
Retrieves the maximum position for the slider in the trackbar. GetRangeMin
int GetRangeMin() const;
Retrieves the minimum position for the slider in the trackbar. GetSelEnd
int GetSelEnd() const;
Retrieves the ending position of the current selection range in the trackbar. GetSetStart
int GetSelStart() const;
Retrieves the starting position of the current selection range in the trackbar. GetThumbLength
int GetThumbLength() const;
Retrieves the length of the slider in the trackbar. GetThumbRect
CRect GetThumbRect() const;
Retrieve the size and position of the bounding rectangle for the slider in the trackbar. GetTic
int GetTic(int nTic ) const;
Retrieves the logical position of a tick mark in the trackbar. GetTicPos
int GetTicPos(int nTic) const;
Retrieves the current physical position of a tick mark in the trackbar. GetToolTips
HWND GetToolTips() const;
Retrieves the handle to the ToolTip control assigned to the trackbar, if any. SetBuddy
HWND SetBuddy(HWND hwndBuddy, BOOL fLocation = TRUE ) const;
Assigns a window as the buddy window for the trackbar control. SetLineSize
int SetLineSize(int nSize) const;
Sets the number of logical positions the trackbar's slider moves in response to keyboard input from arrow keys. SetPageSize
int SetPageSize(int nSize) const;
Sets the number of logical positions the trackbar's slider moves in response to keyboard input, or mouse input such as clicks in the trackbar's channel. SetPos
void SetPos(int nPos, BOOL bRedraw = FALSE) const;
Sets the current logical position of the slider in the trackbar. SetRangeMax
void SetRangeMax(int nMax, BOOL bRedraw = FALSE) const;
Set the maximum logical position for the slider in the trackbar. SetRangeMin
void SetRangeMin(int nMax, BOOL bRedraw = FALSE) const;
Sets the minimum logical position for the slider in the trackbar. SetSelection
void SetSelection(int nMin, int nMax, BOOL bRedraw = FALSE) const;
Sets the starting and ending positions for the available selection range in the trackbar. SetTic
BOOL SetTic(int nTic) const;
Sets a tick mark in the trackbar at the specified logical position. SetTicFreq
void SetTicFreq(int nFreq) const;
Sets the interval frequency for tick marks in the trackbar. SetTipSide
int SetTipSide(int nLocation) const;
Positions the ToolTip control used by the trackbar control. SetToolTips
void SetToolTips(HWND hwndTip) const;
Assigns a ToolTip control to the trackbar control.
Base class Members

For base class members, refer to the members of CWnd.

Remarks

Like all common controls, the slider control requires a parent window. This parent window is often a dialog, but simple windows can also be the parent window for a slider control.

A slider control is often referred to as a trackbar control.

Summary Information

Header file controls.h
Win32/64 support Yes
WinCE support Yes