diff options
-rw-r--r-- | include/m_chat_int.h | 3 | ||||
-rw-r--r-- | libs/win32/mir_app.lib | bin | 115866 -> 115876 bytes | |||
-rw-r--r-- | libs/win64/mir_app.lib | bin | 111486 -> 111496 bytes | |||
-rw-r--r-- | plugins/Scriver/src/chat_window.cpp | 2 | ||||
-rw-r--r-- | plugins/Scriver/src/msgdialog.cpp | 2 | ||||
-rw-r--r-- | plugins/Scriver/src/msgs.h | 5 | ||||
-rw-r--r-- | src/core/stdmsg/src/chat_window.cpp | 2 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgdialog.cpp | 2 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgs.h | 1 | ||||
-rw-r--r-- | src/core/stdmsg/src/stdafx.h | 1 | ||||
-rw-r--r-- | src/mir_app/src/mir_app.def | 2 | ||||
-rw-r--r-- | src/mir_app/src/mir_app64.def | 2 | ||||
-rw-r--r-- | src/mir_app/src/srmm_base.cpp | 9 |
13 files changed, 24 insertions, 7 deletions
diff --git a/include/m_chat_int.h b/include/m_chat_int.h index ce66e3387a..48759177bc 100644 --- a/include/m_chat_int.h +++ b/include/m_chat_int.h @@ -400,7 +400,8 @@ protected: CSrmmBaseDialog(HINSTANCE hInst, int idDialog, SESSION_INFO *si = nullptr);
virtual void OnInitDialog() override;
- virtual void OnClose() override;
+ virtual void OnDestroy() override;
+
virtual INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override;
void DoEventHook(int iType, const USERINFO *pUser, const wchar_t *pszText, INT_PTR dwItem);
diff --git a/libs/win32/mir_app.lib b/libs/win32/mir_app.lib Binary files differindex e756d4df48..c8cb7b26ee 100644 --- a/libs/win32/mir_app.lib +++ b/libs/win32/mir_app.lib diff --git a/libs/win64/mir_app.lib b/libs/win64/mir_app.lib Binary files differindex c11668f931..d614266d9f 100644 --- a/libs/win64/mir_app.lib +++ b/libs/win64/mir_app.lib diff --git a/plugins/Scriver/src/chat_window.cpp b/plugins/Scriver/src/chat_window.cpp index 1dbf67ea87..bb9b543bea 100644 --- a/plugins/Scriver/src/chat_window.cpp +++ b/plugins/Scriver/src/chat_window.cpp @@ -322,6 +322,8 @@ void CChatRoomDlg::OnDestroy() }
NotifyLocalWinEvent(m_hContact, m_hwnd, MSG_WINDOW_EVT_CLOSE);
+
+ CSuper::OnDestroy();
}
void CChatRoomDlg::OnSplitterX(CSplitter *pSplitter)
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index 4ff67f7b9a..36a11f9e6c 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -466,6 +466,8 @@ void CSrmmWindow::OnDestroy() CallService(MS_IEVIEW_WINDOW, 0, (LPARAM)&ieWindow);
}
NotifyLocalWinEvent(m_hContact, m_hwnd, MSG_WINDOW_EVT_CLOSE);
+
+ CSuper::OnDestroy();
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/Scriver/src/msgs.h b/plugins/Scriver/src/msgs.h index 7cad122c1f..b2c824a3d5 100644 --- a/plugins/Scriver/src/msgs.h +++ b/plugins/Scriver/src/msgs.h @@ -87,6 +87,7 @@ struct ParentWindowData class CScriverWindow : public CSrmmBaseDialog
{
+ typedef CSrmmBaseDialog CSuper;
protected:
CScriverWindow(int iDialog, SESSION_INFO* = nullptr);
@@ -105,6 +106,8 @@ public: class CSrmmWindow : public CScriverWindow
{
+ typedef CScriverWindow CSuper;
+
CCtrlEdit m_log, m_message;
CCtrlButton m_btnOk, m_btnAdd, m_btnUserMenu, m_btnQuote, m_btnDetails;
CSplitter m_splitter;
@@ -183,6 +186,8 @@ public: class CChatRoomDlg : public CScriverWindow
{
+ typedef CScriverWindow CSuper;
+
CCtrlEdit m_message, m_log;
CCtrlButton m_btnOk;
CSplitter m_splitterX, m_splitterY;
diff --git a/src/core/stdmsg/src/chat_window.cpp b/src/core/stdmsg/src/chat_window.cpp index 24057875bc..3247b0ef98 100644 --- a/src/core/stdmsg/src/chat_window.cpp +++ b/src/core/stdmsg/src/chat_window.cpp @@ -142,6 +142,8 @@ void CChatRoomDlg::OnDestroy() DestroyWindow(m_hwndStatus); m_hwndStatus = nullptr; NotifyLocalWinEvent(m_hContact, m_hwnd, MSG_WINDOW_EVT_CLOSE); + + CSuper::OnDestroy(); } void CChatRoomDlg::onClick_Filter(CCtrlButton *pButton) diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index 506bd38cd3..fa99f057f7 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -357,6 +357,8 @@ void CSrmmWindow::OnDestroy() db_delete_contact(m_hContact);
Window_FreeIcon_IcoLib(m_hwnd);
+
+ CSuper::OnDestroy();
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/core/stdmsg/src/msgs.h b/src/core/stdmsg/src/msgs.h index e3dc7252f3..83bdc4f3d2 100644 --- a/src/core/stdmsg/src/msgs.h +++ b/src/core/stdmsg/src/msgs.h @@ -50,6 +50,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. class CSrmmWindow : public CSrmmBaseDialog
{
friend struct CTabbedWindow;
+ typedef CSrmmBaseDialog CSuper;
static LRESULT CALLBACK TabSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
diff --git a/src/core/stdmsg/src/stdafx.h b/src/core/stdmsg/src/stdafx.h index 5ad8cfb5a5..c09f311e83 100644 --- a/src/core/stdmsg/src/stdafx.h +++ b/src/core/stdmsg/src/stdafx.h @@ -206,6 +206,7 @@ void TB_SaveSession(SESSION_INFO *si); class CChatRoomDlg : public CSrmmBaseDialog
{
+ typedef CSrmmBaseDialog CSuper;
friend struct CTabbedWindow;
static INT_PTR CALLBACK FilterWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def index ad0242556b..3e4a88525d 100644 --- a/src/mir_app/src/mir_app.def +++ b/src/mir_app/src/mir_app.def @@ -436,4 +436,4 @@ Chat_UpdateOptions @418 NONAME ?WndProc_Message@CSrmmBaseDialog@@UAEJIIJ@Z @438 NONAME
?WndProc_Nicklist@CSrmmBaseDialog@@UAEJIIJ@Z @439 NONAME
?onDblClick_List@CSrmmBaseDialog@@IAEXPAVCCtrlListBox@@@Z @440 NONAME
-?OnClose@CSrmmBaseDialog@@MAEXXZ @441 NONAME
+?OnDestroy@CSrmmBaseDialog@@MAEXXZ @441 NONAME
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def index c16ce177a3..6dfa439270 100644 --- a/src/mir_app/src/mir_app64.def +++ b/src/mir_app/src/mir_app64.def @@ -436,4 +436,4 @@ Chat_UpdateOptions @418 NONAME ?WndProc_Message@CSrmmBaseDialog@@UEAA_JI_K_J@Z @438 NONAME
?WndProc_Nicklist@CSrmmBaseDialog@@UEAA_JI_K_J@Z @439 NONAME
?onDblClick_List@CSrmmBaseDialog@@IEAAXPEAVCCtrlListBox@@@Z @440 NONAME
-?OnClose@CSrmmBaseDialog@@MEAAXXZ @441 NONAME
+?OnDestroy@CSrmmBaseDialog@@MEAAXXZ @441 NONAME
diff --git a/src/mir_app/src/srmm_base.cpp b/src/mir_app/src/srmm_base.cpp index 8066b99851..689776bedd 100644 --- a/src/mir_app/src/srmm_base.cpp +++ b/src/mir_app/src/srmm_base.cpp @@ -133,7 +133,7 @@ LRESULT CSrmmBaseDialog::WndProc_Log(UINT /*msg*/, WPARAM /*wParam*/, LPARAM /*l static LRESULT CALLBACK stubLogProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { - CSrmmBaseDialog *pDlg = (CSrmmBaseDialog*)GetWindowLongPtr(hwnd, GWLP_USERDATA); + CSrmmBaseDialog *pDlg = (CSrmmBaseDialog*)GetWindowLongPtr(GetParent(hwnd), GWLP_USERDATA); if (pDlg != nullptr) pDlg->WndProc_Log(msg, wParam, lParam); @@ -149,7 +149,7 @@ LRESULT CSrmmBaseDialog::WndProc_Message(UINT /*msg*/, WPARAM /*wParam*/, LPARAM static LRESULT CALLBACK stubMessageProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { - CSrmmBaseDialog *pDlg = (CSrmmBaseDialog*)GetWindowLongPtr(hwnd, GWLP_USERDATA); + CSrmmBaseDialog *pDlg = (CSrmmBaseDialog*)GetWindowLongPtr(GetParent(hwnd), GWLP_USERDATA); if (pDlg != nullptr) pDlg->WndProc_Message(msg, wParam, lParam); @@ -165,7 +165,7 @@ LRESULT CSrmmBaseDialog::WndProc_Nicklist(UINT /*msg*/, WPARAM /*wParam*/, LPARA static LRESULT CALLBACK stubNicklistProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { - CSrmmBaseDialog *pDlg = (CSrmmBaseDialog*)GetWindowLongPtr(hwnd, GWLP_USERDATA); + CSrmmBaseDialog *pDlg = (CSrmmBaseDialog*)GetWindowLongPtr(GetParent(hwnd), GWLP_USERDATA); if (pDlg != nullptr) pDlg->WndProc_Nicklist(msg, wParam, lParam); @@ -192,8 +192,9 @@ void CSrmmBaseDialog::OnInitDialog() LoadSettings(); } -void CSrmmBaseDialog::OnClose() +void CSrmmBaseDialog::OnDestroy() { + SetWindowLongPtr(m_hwnd, GWLP_USERDATA, 0); mir_unsubclassWindow(m_pLog->GetHwnd(), stubLogProc); mir_unsubclassWindow(m_pEntry->GetHwnd(), stubMessageProc); mir_unsubclassWindow(m_nickList.GetHwnd(), stubNicklistProc); |