diff options
author | George Hazan <ghazan@miranda.im> | 2018-05-18 14:17:28 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-05-18 14:17:28 +0300 |
commit | 81c8606dd9aa39067353354aa4523be84ef51fd1 (patch) | |
tree | 3f157c302093074552d0f792c481c741277cd531 /include/m_gui.h | |
parent | 73d12d0f6eb5c673a951eec94ddf5cdeeacde369 (diff) |
CDlgBase::CDlgBase now receives a reference to CMPlugin instead of HINSTANCE
Diffstat (limited to 'include/m_gui.h')
-rw-r--r-- | include/m_gui.h | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/include/m_gui.h b/include/m_gui.h index e7679a56b3..e29ffe7b63 100644 --- a/include/m_gui.h +++ b/include/m_gui.h @@ -395,7 +395,7 @@ class MIR_CORE_EXPORT CDlgBase friend class CCtrlData;
public:
- CDlgBase(HINSTANCE hInst, int idDialog);
+ CDlgBase(class CMPluginBase &pPlug, int idDialog);
virtual ~CDlgBase();
// general utilities
@@ -413,7 +413,7 @@ public: void NotifyChange(void); // sends a notification to a parent window
__forceinline void Fail() { m_lresult = false; }
- __forceinline HINSTANCE GetInst() const { return m_hInst; }
+ __forceinline HINSTANCE GetInst() const { return m_pPlugin.getInst(); }
__forceinline HWND GetHwnd() const { return m_hwnd; }
__forceinline void Hide() { Show(SW_HIDE); }
__forceinline bool IsInitialized() const { return m_initialized; }
@@ -424,15 +424,16 @@ public: static CDlgBase* Find(HWND hwnd);
protected:
- HWND m_hwnd; // must be the first data item
- HINSTANCE m_hInst;
- HWND m_hwndParent;
- int m_idDialog;
- bool m_isModal;
- bool m_initialized;
- bool m_forceResizable;
- bool m_bExiting; // window received WM_CLOSE and gonna die soon
- LRESULT m_lresult;
+ HWND m_hwnd; // must be the first data item
+ HWND m_hwndParent;
+ int m_idDialog;
+ bool m_isModal;
+ bool m_initialized;
+ bool m_forceResizable;
+ bool m_bExiting; // window received WM_CLOSE and gonna die soon
+ LRESULT m_lresult;
+
+ CMPluginBase &m_pPlugin;
enum { CLOSE_ON_OK = 0x1, CLOSE_ON_CANCEL = 0x2 };
BYTE m_autoClose; // automatically close dialog on IDOK/CANCEL commands. default: CLOSE_ON_OK|CLOSE_ON_CANCEL
@@ -1494,7 +1495,9 @@ class CPluginDlgBase : public CDlgBase {
const char *m_szModule;
public:
- CPluginDlgBase(HINSTANCE hInst, int idDialog, const char *module) : CDlgBase(hInst, idDialog), m_szModule(module) {};
+ CPluginDlgBase(CMPluginBase &pPlug, int idDialog, const char *module) :
+ CDlgBase(pPlug, idDialog), m_szModule(module)
+ {};
void CreateLink(CCtrlData& ctrl, const char *szSetting, BYTE type, DWORD iValue)
{
|