summaryrefslogtreecommitdiff
path: root/include/m_gui.h
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2016-04-13 11:27:24 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2016-04-13 11:27:24 +0000
commit8777502927b55c3118d09c702fd3503a4283b753 (patch)
tree9f651d30ba58953ab87cd7c64ef269d9e8c4e85a /include/m_gui.h
parent9b01fa73cd3ce9483cb297cf874217b3ae2943d3 (diff)
CMOptionLink for strings
git-svn-id: http://svn.miranda-ng.org/main/trunk@16639 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include/m_gui.h')
-rw-r--r--include/m_gui.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/m_gui.h b/include/m_gui.h
index 04803efad4..c8b5383b73 100644
--- a/include/m_gui.h
+++ b/include/m_gui.h
@@ -331,6 +331,25 @@ public:
__forceinline void SaveText(TCHAR*) {}
};
+template<>
+class CMOptionLink<TCHAR*> : public CDataLink
+{
+private:
+ typedef TCHAR *T;
+ CMOption<T> *m_option;
+
+public:
+ __forceinline CMOptionLink(CMOption<T> &option) :
+ CDataLink(DBVT_TCHAR), m_option(&option)
+ {}
+
+ __forceinline DWORD LoadInt() { return 0; }
+ __forceinline void SaveInt(DWORD) { }
+
+ __forceinline TCHAR* LoadText() { return *m_option; }
+ __forceinline void SaveText(TCHAR *value) { *m_option = value; }
+};
+
/////////////////////////////////////////////////////////////////////////////////////////
// CDlgBase - base dialog class