summaryrefslogtreecommitdiff
path: root/src/mir_app
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-03-23 22:06:53 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-03-23 22:06:53 +0300
commit34e059269d3c8a5d999575efce347c116b7be52a (patch)
tree054a2d928dd54ae5de71114636b38e6e6b3d8687 /src/mir_app
parent7d191d7bf8dc09f8484a05d898c8d0971beaa10b (diff)
usual crutches sometimes don't work, we need the stronger ones
Diffstat (limited to 'src/mir_app')
-rw-r--r--src/mir_app/src/mir_app.def2
-rw-r--r--src/mir_app/src/mir_app64.def2
-rw-r--r--src/mir_app/src/srmm_base.cpp9
3 files changed, 7 insertions, 6 deletions
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);