diff options
author | George Hazan <ghazan@miranda.im> | 2019-03-19 19:02:48 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-03-19 19:02:48 +0300 |
commit | 52fa4fd5a679c218290f96c2a86e91b7800f24f9 (patch) | |
tree | 20cf02b0fef97fbde32054591e0204e8e89c8dcf /src/mir_core | |
parent | a094406393090fd25b6e8fa71b50d052131f5f38 (diff) |
CCtrlDate - new UI class for date/time pickers
Diffstat (limited to 'src/mir_core')
-rw-r--r-- | src/mir_core/src/cctrldate.cpp | 44 | ||||
-rw-r--r-- | src/mir_core/src/mir_core.def | 5 | ||||
-rw-r--r-- | src/mir_core/src/mir_core64.def | 5 |
3 files changed, 54 insertions, 0 deletions
diff --git a/src/mir_core/src/cctrldate.cpp b/src/mir_core/src/cctrldate.cpp new file mode 100644 index 0000000000..3d02083d3c --- /dev/null +++ b/src/mir_core/src/cctrldate.cpp @@ -0,0 +1,44 @@ +/* + +Object UI extensions +Copyright (c) 2008 Victor Pavlychko, George Hazan +Copyright (C) 2012-19 Miranda NG team + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +*/ + +#include "stdafx.h" + +///////////////////////////////////////////////////////////////////////////////////////// +// CCtrlDate class + +CCtrlDate::CCtrlDate(CDlgBase *dlg, int ctrlId) : + CCtrlData(dlg, ctrlId) +{} + +BOOL CCtrlDate::OnNotify(int, NMHDR *pnmh) +{ + if (pnmh->code == DTN_DATETIMECHANGE) { + NotifyChange(); + return TRUE; + } + return FALSE; +} + +void CCtrlDate::GetSystemDate(SYSTEMTIME *pDate) +{ + ::SendMessage(m_hwnd, DTM_SETSYSTEMTIME, 0, (LPARAM)pDate); +} diff --git a/src/mir_core/src/mir_core.def b/src/mir_core/src/mir_core.def index 8ae1ef2f8d..216ae8776a 100644 --- a/src/mir_core/src/mir_core.def +++ b/src/mir_core/src/mir_core.def @@ -1427,3 +1427,8 @@ XmlGetChildByTag @1642 XmlGetChildCount @1643
XmlGetChildInt @1644
XmlGetChildText @1645
+??0CCtrlDate@@QAE@PAVCDlgBase@@H@Z @1646 NONAME
+??1CCtrlDate@@UAE@XZ @1647 NONAME
+??_7CCtrlDate@@6B@ @1648 NONAME
+?GetSystemDate@CCtrlDate@@QAEXPAU_SYSTEMTIME@@@Z @1649 NONAME
+?OnNotify@CCtrlDate@@EAEHHPAUtagNMHDR@@@Z @1650 NONAME
diff --git a/src/mir_core/src/mir_core64.def b/src/mir_core/src/mir_core64.def index 2ffdb4d9e9..0c53c11f90 100644 --- a/src/mir_core/src/mir_core64.def +++ b/src/mir_core/src/mir_core64.def @@ -1427,3 +1427,8 @@ XmlGetChildByTag @1642 XmlGetChildCount @1643
XmlGetChildInt @1644
XmlGetChildText @1645
+??0CCtrlDate@@QEAA@PEAVCDlgBase@@H@Z @1646 NONAME
+??1CCtrlDate@@UEAA@XZ @1647 NONAME
+??_7CCtrlDate@@6B@ @1648 NONAME
+?GetSystemDate@CCtrlDate@@QEAAXPEAU_SYSTEMTIME@@@Z @1649 NONAME
+?OnNotify@CCtrlDate@@EEAAHHPEAUtagNMHDR@@@Z @1650 NONAME
|