diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2016-04-21 19:02:31 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2016-04-21 19:02:31 +0000 |
commit | 66bdd13c2e359a0450b4c3f484c95a11224b5222 (patch) | |
tree | be24a63cac2f8448cf96c070850c441cef6ff73a /include/m_gui.h | |
parent | e6d9077376a4b89b80db7a407902af21832fcb61 (diff) |
m_gui: added CPluginDlgBase class
git-svn-id: http://svn.miranda-ng.org/main/trunk@16736 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include/m_gui.h')
-rw-r--r-- | include/m_gui.h | 21 |
1 files changed, 21 insertions, 0 deletions
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<class T>
+ __inline void CreateLink(CCtrlData& ctrl, CMOption<T> &option)
+ {
+ ctrl.CreateDbLink(new CMOptionLink<T>(option));
+ }
+};
+
/////////////////////////////////////////////////////////////////////////////////////////
// Safe open/close dialogs
#define UI_SAFE_OPEN(dlgClass, dlgPtr) \
|