From 8777502927b55c3118d09c702fd3503a4283b753 Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Wed, 13 Apr 2016 11:27:24 +0000 Subject: CMOptionLink for strings git-svn-id: http://svn.miranda-ng.org/main/trunk@16639 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- include/m_gui.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'include') 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 : public CDataLink +{ +private: + typedef TCHAR *T; + CMOption *m_option; + +public: + __forceinline CMOptionLink(CMOption &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 -- cgit v1.2.3