Public Member Functions | |
CSliderCtrlWithEcho () | |
void | Initialize (float min, float max, float init) |
bool | SetSliderValue (float userValue) |
float | GetSliderValue () |
Protected Member Functions | |
int | ConvertUserValueToSliderPosition (float userValue) const |
float | ConvertSliderPositionToUserValue (int position) const |
void | UpdateSliderEcho () |
afx_msg void | HScroll (UINT nSBCode, UINT nPos) |
afx_msg void | VScroll (UINT nSBCode, UINT nPos) |
afx_msg void | OnShowWindow (BOOL bShow, UINT nStatus) |
bool | IsOrientedVertical () const |
virtual void | OnScroll (float new_value) |
Protected Attributes | |
float | m_minimum_value |
float | m_value_range |
CStatic | m_MessageWnd |
Static Protected Attributes | |
const int | SLIDER_RESOLUTION = 100000 |
|
macro for adding runtime type information to this class. The cpp file will also need an IMPLEMENT_DYNAMIC declaration |
|
Initialize the range and initial value of the control
|
|
Set the controls tick pposition to represent a value between the min and max values of the slider See Initialize
|
|
Return the current value that the slider tick represents |
|
Convert a floating point value to an integer tick position value |
|
Convert an integer tick position to a floating point value |
|
Update the text in the static control that displays the current value the slider represents |
|
Called when the parent dialog receives a WM_HSCROLL message and the dialog "reflects" the message back to this control See MSDN documentation for information on parameters |
|
Called when the parent dialog receives a WM_VSCROLL message and the dialog "reflects" the message back to this control See MSDN documentation for information on parameters |
|
Called when this control receives a WM_SHOWWINDOW message This control creates a static control to display the slider status. This message is caught to make sure the visibility state of the static text matches this control's state See MSDN documentation for information on parameters |
|
True if this control is oriented vertically False if this control is oriented horizontally |
|
A slider control uses integer values for positions. The position value needs to be converted into a floating point value for the user. By using a high position resolution, we can get higher precision floating point values |
|
floating point value representing the minimum value in the slider rance |
|
Total range of values covered from minimum to maximum. The maximum value is m_minimum_value + m_value_range |
|
A static "buddy" control for displaying the current slider value. The control is created and placed next to this control automatically |