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