diff options
Diffstat (limited to 'src/mir_core/src/CCtrlSpin.cpp')
-rw-r--r-- | src/mir_core/src/CCtrlSpin.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/mir_core/src/CCtrlSpin.cpp b/src/mir_core/src/CCtrlSpin.cpp index 56491c1411..f0af3c9609 100644 --- a/src/mir_core/src/CCtrlSpin.cpp +++ b/src/mir_core/src/CCtrlSpin.cpp @@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // CCtrlSpin class CCtrlSpin::CCtrlSpin(CDlgBase *dlg, int ctrlId) - : CCtrlBase(dlg, ctrlId) + : CCtrlData(dlg, ctrlId) {} BOOL CCtrlSpin::OnNotify(int, NMHDR *pnmh) @@ -35,10 +35,23 @@ BOOL CCtrlSpin::OnNotify(int, NMHDR *pnmh) NotifyChange(); return TRUE; } - return FALSE; } +void CCtrlSpin::OnApply() +{ + CSuper::OnApply(); + + if (m_dbLink != nullptr) + SaveInt(GetPosition()); +} + +void CCtrlSpin::OnReset() +{ + if (m_dbLink != nullptr) + SetPosition(LoadInt()); +} + WORD CCtrlSpin::GetPosition() { return SendMsg(UDM_GETPOS, 0, 0); |