From c9b740a178828eae5cc4be7ab054e5f26d3a27e7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 21 Sep 2023 14:34:07 +0300 Subject: MessageWindowEventData: useless structure removed --- plugins/PasteIt/src/PasteIt.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'plugins/PasteIt/src') diff --git a/plugins/PasteIt/src/PasteIt.cpp b/plugins/PasteIt/src/PasteIt.cpp index ee1393169e..7091b635b1 100644 --- a/plugins/PasteIt/src/PasteIt.cpp +++ b/plugins/PasteIt/src/PasteIt.cpp @@ -297,18 +297,20 @@ static void InitTabsrmmButton() hTabsrmmButtonPressed = HookEvent(ME_MSG_BUTTONPRESSED, TabsrmmButtonPressed); } -static int WindowEvent(WPARAM, MessageWindowEventData* lParam) +static int WindowEvent(WPARAM uType, LPARAM lParam) { - if (lParam->uType == MSG_WINDOW_EVT_OPEN) { - char *szProto = Proto_GetBaseAccountName(lParam->hContact); + auto *pDlg = (CSrmmBaseDialog *)lParam; + + if (uType == MSG_WINDOW_EVT_OPEN) { + char *szProto = Proto_GetBaseAccountName(pDlg->m_hContact); if (szProto && (INT_PTR)szProto != CALLSERVICE_NOTFOUND) { - if (Contact::IsGroupChat(lParam->hContact, szProto)) { - (*contactWindows)[lParam->hContact] = lParam->hwndInput; + if (Contact::IsGroupChat(pDlg->m_hContact, szProto)) { + (*contactWindows)[pDlg->m_hContact] = pDlg->GetInput(); } } } - else if (lParam->uType == MSG_WINDOW_EVT_CLOSE) { - std::map::iterator it = contactWindows->find(lParam->hContact); + else if (uType == MSG_WINDOW_EVT_CLOSE) { + std::map::iterator it = contactWindows->find(pDlg->m_hContact); if (it != contactWindows->end()) { contactWindows->erase(it); } -- cgit v1.2.3