From 6bf18e4265c8a0938d12e98eef1562b1ee4bc97b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 9 Mar 2017 14:30:35 +0300 Subject: any CSrmmBaseDialog descendant can refer to SESSION_INFO, not only CChatRoomDlg --- plugins/Scriver/src/chat/window.cpp | 8 ++++---- plugins/Scriver/src/msgs.h | 5 ++++- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'plugins/Scriver/src') diff --git a/plugins/Scriver/src/chat/window.cpp b/plugins/Scriver/src/chat/window.cpp index 251bb7acf1..c48e0c8ea5 100644 --- a/plugins/Scriver/src/chat/window.cpp +++ b/plugins/Scriver/src/chat/window.cpp @@ -118,7 +118,7 @@ LBL_SkipEnd: } } -static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +LRESULT CALLBACK CChatRoomDlg::MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { BOOL isShift = GetKeyState(VK_SHIFT) & 0x8000; BOOL isCtrl = GetKeyState(VK_CONTROL) & 0x8000; @@ -459,7 +459,7 @@ static LRESULT CALLBACK ButtonSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, L return mir_callNextSubclass(hwnd, ButtonSubclassProc, msg, wParam, lParam); } -static LRESULT CALLBACK LogSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +LRESULT CALLBACK CChatRoomDlg::LogSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { static BOOL inMenu = FALSE; CChatRoomDlg *pDlg = (CChatRoomDlg*)GetWindowLongPtr(GetParent(hwnd), GWLP_USERDATA); @@ -582,7 +582,7 @@ static LRESULT CALLBACK LogSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR return mir_callNextSubclass(hwnd, LogSubclassProc, msg, wParam, lParam); } -static LRESULT CALLBACK NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +LRESULT CALLBACK CChatRoomDlg::NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { CChatRoomDlg *pDlg = (CChatRoomDlg*)GetWindowLongPtr(GetParent(hwnd), GWLP_USERDATA); @@ -863,7 +863,6 @@ void CChatRoomDlg::MessageDialogResize(int w, int h) CChatRoomDlg::CChatRoomDlg(SESSION_INFO *si) : CScriverWindow(IDD_CHANNEL), - m_si(si), m_log(this, IDC_LOG), m_message(this, IDC_MESSAGE), @@ -883,6 +882,7 @@ CChatRoomDlg::CChatRoomDlg(SESSION_INFO *si) m_btnShowList(this, IDC_SHOWNICKLIST), m_btnUnderline(this, IDC_UNDERLINE) { + m_si = si; m_pLog = &m_log; m_pEntry = &m_message; m_hContact = si->hContact; diff --git a/plugins/Scriver/src/msgs.h b/plugins/Scriver/src/msgs.h index 8e04ec88d5..e7b9e57086 100644 --- a/plugins/Scriver/src/msgs.h +++ b/plugins/Scriver/src/msgs.h @@ -175,8 +175,11 @@ class CChatRoomDlg : public CScriverWindow void MessageDialogResize(int w, int h); + static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); + static LRESULT CALLBACK LogSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); + static LRESULT CALLBACK NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); + public: - SESSION_INFO *m_si; wchar_t m_wszSearch[255]; public: -- cgit v1.2.3