From 7fc01c9c474a732cd8b978d2f163f0839b2f956d Mon Sep 17 00:00:00 2001 From: aunsane Date: Sat, 24 Feb 2018 16:42:36 +0300 Subject: core: added CCtrlLabel for static text --- include/m_gui.h | 11 +++++++++++ libs/win32/mir_core.lib | Bin 320826 -> 321536 bytes libs/win64/mir_core.lib | Bin 321844 -> 322568 bytes src/mir_core/src/CCtrlLabel.cpp | 31 +++++++++++++++++++++++++++++++ src/mir_core/src/CDlgBase.cpp | 2 ++ src/mir_core/src/mir_core.def | 3 +++ src/mir_core/src/mir_core64.def | 3 +++ 7 files changed, 50 insertions(+) create mode 100644 src/mir_core/src/CCtrlLabel.cpp diff --git a/include/m_gui.h b/include/m_gui.h index 58f20dbac9..7b0fa6894b 100644 --- a/include/m_gui.h +++ b/include/m_gui.h @@ -576,6 +576,17 @@ private: static LRESULT CALLBACK GlobalSubclassWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); }; +///////////////////////////////////////////////////////////////////////////////////////// +// CCtrlLabel + +class MIR_CORE_EXPORT CCtrlLabel : public CCtrlBase +{ + typedef CCtrlBase CSuper; + +public: + CCtrlLabel(CDlgBase *dlg, int ctrlId); +}; + ///////////////////////////////////////////////////////////////////////////////////////// // CCtrlButton diff --git a/libs/win32/mir_core.lib b/libs/win32/mir_core.lib index d0f73992cf..ed22859f77 100644 Binary files a/libs/win32/mir_core.lib and b/libs/win32/mir_core.lib differ diff --git a/libs/win64/mir_core.lib b/libs/win64/mir_core.lib index 93e4bbceb0..660257d5e4 100644 Binary files a/libs/win64/mir_core.lib and b/libs/win64/mir_core.lib differ diff --git a/src/mir_core/src/CCtrlLabel.cpp b/src/mir_core/src/CCtrlLabel.cpp new file mode 100644 index 0000000000..c54504a7fe --- /dev/null +++ b/src/mir_core/src/CCtrlLabel.cpp @@ -0,0 +1,31 @@ +/* + +Object UI extensions +Copyright (c) 2008 Victor Pavlychko, George Hazan +Copyright (c) 2012-18 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" + +///////////////////////////////////////////////////////////////////////////////////////// +// CCtrlLabel + +CCtrlLabel::CCtrlLabel(CDlgBase* wnd, int idCtrl) + : CCtrlBase(wnd, idCtrl) +{} + diff --git a/src/mir_core/src/CDlgBase.cpp b/src/mir_core/src/CDlgBase.cpp index 79f865d7bb..dc938f1fc4 100644 --- a/src/mir_core/src/CDlgBase.cpp +++ b/src/mir_core/src/CDlgBase.cpp @@ -134,6 +134,8 @@ BOOL CALLBACK CDlgBase::GlobalFieldEnum(HWND hwnd, LPARAM lParam) wchar_t wszClass[100]; GetClassNameW(hwnd, wszClass, _countof(wszClass)); + if (!wcsicmp(wszClass, L"Static")) + new CCtrlLabel(pDlg, id); if (!wcsicmp(wszClass, L"Edit")) new CCtrlEdit(pDlg, id); else if (!wcsicmp(wszClass, L"ComboBox")) diff --git a/src/mir_core/src/mir_core.def b/src/mir_core/src/mir_core.def index a0f547246a..04f823d5fd 100644 --- a/src/mir_core/src/mir_core.def +++ b/src/mir_core/src/mir_core.def @@ -1063,3 +1063,6 @@ IsTerminalDisconnected @1245 ?OnReset@CCtrlSpin@@UAEXXZ @1253 NONAME ?SetUrl@CCtrlHyperlink@@QAEXPBD@Z @1254 NONAME ?Default_OnClick@CCtrlHyperlink@@IAEXPAV1@@Z @1255 NONAME +??0CCtrlLabel@@QAE@PAVCDlgBase@@H@Z @1256 NONAME +??1CCtrlLabel@@UAE@XZ @1257 NONAME +??_7CCtrlLabel@@6B@ @1258 NONAME diff --git a/src/mir_core/src/mir_core64.def b/src/mir_core/src/mir_core64.def index 57272df5e8..a103f25a92 100644 --- a/src/mir_core/src/mir_core64.def +++ b/src/mir_core/src/mir_core64.def @@ -1063,3 +1063,6 @@ IsTerminalDisconnected @1245 ?OnApply@CCtrlSpin@@UEAAXXZ @1253 NONAME ?OnReset@CCtrlSpin@@UEAAXXZ @1254 NONAME ?SetUrl@CCtrlHyperlink@@QEAAXPEBD@Z @1255 NONAME +??0CCtrlLabel@@QEAA@PEAVCDlgBase@@H@Z @1256 NONAME +??1CCtrlLabel@@UEAA@XZ @1257 NONAME +??_7CCtrlLabel@@6B@ @1258 NONAME -- cgit v1.2.3