summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/m_gui.h21
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) \