summaryrefslogtreecommitdiff
path: root/src/mir_core
diff options
context:
space:
mode:
authoraunsane <aunsane@gmail.com>2018-02-24 16:42:36 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-02-25 13:40:57 +0200
commit7fc01c9c474a732cd8b978d2f163f0839b2f956d (patch)
treea0060ed447304fdb421eae11f7dd134e71daadca /src/mir_core
parent97467f12d9d357e9e1c6cf29e0a9d40c2ac8b05d (diff)
core: added CCtrlLabel for static text
Diffstat (limited to 'src/mir_core')
-rw-r--r--src/mir_core/src/CCtrlLabel.cpp31
-rw-r--r--src/mir_core/src/CDlgBase.cpp2
-rw-r--r--src/mir_core/src/mir_core.def3
-rw-r--r--src/mir_core/src/mir_core64.def3
4 files changed, 39 insertions, 0 deletions
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