From 66bdd13c2e359a0450b4c3f484c95a11224b5222 Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Thu, 21 Apr 2016 19:02:31 +0000 Subject: m_gui: added CPluginDlgBase class git-svn-id: http://svn.miranda-ng.org/main/trunk@16736 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- include/m_gui.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/include/m_gui.h b/include/m_gui.h index 19297d0d91..0d9b709332 100644 --- a/include/m_gui.h +++ b/include/m_gui.h @@ -1298,6 +1298,27 @@ protected: TProto* m_proto; }; +class CPluginDlgBase : public CDlgBase +{ + const char *m_szModule; +public: + CPluginDlgBase(HINSTANCE hInst, int idDialog, const char *module) : CDlgBase(hInst, idDialog), m_szModule(module) {}; + + void CreateLink(CCtrlData& ctrl, const char *szSetting, BYTE type, DWORD iValue) + { + ctrl.CreateDbLink(m_szModule, szSetting, type, iValue); + } + void CreateLink(CCtrlData& ctrl, const char *szSetting, TCHAR *szValue) + { + ctrl.CreateDbLink(m_szModule, szSetting, szValue); + } + template + __inline void CreateLink(CCtrlData& ctrl, CMOption &option) + { + ctrl.CreateDbLink(new CMOptionLink(option)); + } +}; + ///////////////////////////////////////////////////////////////////////////////////////// // Safe open/close dialogs #define UI_SAFE_OPEN(dlgClass, dlgPtr) \ -- cgit v1.2.3