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 | |
parent | a094406393090fd25b6e8fa71b50d052131f5f38 (diff) |
CCtrlDate - new UI class for date/time pickers
-rw-r--r-- | include/m_gui.h | 15 | ||||
-rw-r--r-- | libs/win32/mir_core.lib | bin | 453438 -> 454874 bytes | |||
-rw-r--r-- | libs/win64/mir_core.lib | bin | 458058 -> 459530 bytes | |||
-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 |
6 files changed, 69 insertions, 0 deletions
diff --git a/include/m_gui.h b/include/m_gui.h index a5d50beaa3..b69b0bec3a 100644 --- a/include/m_gui.h +++ b/include/m_gui.h @@ -814,6 +814,21 @@ public: };
/////////////////////////////////////////////////////////////////////////////////////////
+// CCtrlDate - date & time picker
+
+class MIR_CORE_EXPORT CCtrlDate : public CCtrlData
+{
+ typedef CCtrlData CSuper;
+
+ BOOL OnNotify(int, NMHDR*) override;
+
+public:
+ CCtrlDate(CDlgBase *dlg, int ctrlId);
+
+ void GetSystemDate(SYSTEMTIME*);
+};
+
+/////////////////////////////////////////////////////////////////////////////////////////
// CCtrlEdit
class MIR_CORE_EXPORT CCtrlEdit : public CCtrlData
diff --git a/libs/win32/mir_core.lib b/libs/win32/mir_core.lib Binary files differindex 8bfa2ecc50..2601b41e54 100644 --- a/libs/win32/mir_core.lib +++ b/libs/win32/mir_core.lib diff --git a/libs/win64/mir_core.lib b/libs/win64/mir_core.lib Binary files differindex bb285eec3b..acb3b4dbbf 100644 --- a/libs/win64/mir_core.lib +++ b/libs/win64/mir_core.lib 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
|