summaryrefslogtreecommitdiff
path: root/src/mir_core/src/CCtrlSpin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mir_core/src/CCtrlSpin.cpp')
-rw-r--r--src/mir_core/src/CCtrlSpin.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/mir_core/src/CCtrlSpin.cpp b/src/mir_core/src/CCtrlSpin.cpp
index 301bbd2627..4d8f343c98 100644
--- a/src/mir_core/src/CCtrlSpin.cpp
+++ b/src/mir_core/src/CCtrlSpin.cpp
@@ -25,8 +25,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
/////////////////////////////////////////////////////////////////////////////////////////
// CCtrlSpin class
-CCtrlSpin::CCtrlSpin(CDlgBase *dlg, int ctrlId)
- : CCtrlData(dlg, ctrlId)
+CCtrlSpin::CCtrlSpin(CDlgBase *dlg, int ctrlId, WORD wMax, WORD wMin) :
+ CCtrlData(dlg, ctrlId),
+ m_wMin(wMin),
+ m_wMax(wMax)
{}
BOOL CCtrlSpin::OnNotify(int, NMHDR *pnmh)
@@ -49,6 +51,8 @@ bool CCtrlSpin::OnApply()
void CCtrlSpin::OnReset()
{
+ SendMsg(UDM_SETRANGE, 0, MAKELPARAM(m_wMax, m_wMin));
+
if (m_dbLink != nullptr)
SetPosition(LoadInt());
}
@@ -62,8 +66,3 @@ void CCtrlSpin::SetPosition(WORD wPos)
{
SendMsg(UDM_SETPOS, 0, wPos);
}
-
-void CCtrlSpin::SetRange(WORD wMax, WORD wMin)
-{
- SendMsg(UDM_SETRANGE, 0, MAKELPARAM(wMax, wMin));
-}