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/UserInfoEx/src/Flags/svc_flags.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'plugins/UserInfoEx') diff --git a/plugins/UserInfoEx/src/Flags/svc_flags.cpp b/plugins/UserInfoEx/src/Flags/svc_flags.cpp index 590a95d6a3..193020cb32 100644 --- a/plugins/UserInfoEx/src/Flags/svc_flags.cpp +++ b/plugins/UserInfoEx/src/Flags/svc_flags.cpp @@ -113,25 +113,26 @@ void UpdateStatusIcons() } //hookProc ME_MSG_WINDOWEVENT -static int OnMsgWndEvent(WPARAM, LPARAM lParam) +static int OnMsgWndEvent(WPARAM uType, LPARAM lParam) { + auto *pDlg = (CSrmmBaseDialog *)lParam; + MsgWndData *msgwnd; - MessageWindowEventData *msgwe = (MessageWindowEventData*)lParam; /* sanity check */ - if (msgwe->hContact == NULL) + if (pDlg->m_hContact == NULL) return 0; - switch (msgwe->uType) { + switch (uType) { case MSG_WINDOW_EVT_OPENING: - msgwnd = gMsgWndList.find((MsgWndData*)&msgwe->hContact); + msgwnd = gMsgWndList.find((MsgWndData*)&pDlg->m_hContact); if (msgwnd == nullptr) { - msgwnd = new MsgWndData(msgwe->hwndWindow, msgwe->hContact); + msgwnd = new MsgWndData(pDlg->GetHwnd(), pDlg->m_hContact); gMsgWndList.insert(msgwnd); } break; case MSG_WINDOW_EVT_CLOSE: - int i = gMsgWndList.getIndex((MsgWndData*)&msgwe->hContact); + int i = gMsgWndList.getIndex((MsgWndData*)&pDlg->m_hContact); if (i != -1) { delete gMsgWndList[i]; gMsgWndList.remove(i); -- cgit v1.2.3