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/SpellChecker/src/utils.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'plugins/SpellChecker/src') diff --git a/plugins/SpellChecker/src/utils.cpp b/plugins/SpellChecker/src/utils.cpp index 82e7d73de3..0c3e490112 100644 --- a/plugins/SpellChecker/src/utils.cpp +++ b/plugins/SpellChecker/src/utils.cpp @@ -1307,16 +1307,14 @@ int ShowPopupMenu(HWND hwnd, HMENU hMenu, POINT pt, HWND hwndOwner) return selection; } -int MsgWindowEvent(WPARAM, LPARAM lParam) +int MsgWindowEvent(WPARAM uType, LPARAM lParam) { - MessageWindowEventData *event = (MessageWindowEventData *)lParam; - if (event == nullptr) - return 0; + auto *pDlg = (CSrmmBaseDialog *)lParam; - if (event->uType == MSG_WINDOW_EVT_OPEN) - AddContactTextBox(event->hContact, event->hwndInput, "DefaultSRMM", TRUE, event->hwndWindow); - else if (event->uType == MSG_WINDOW_EVT_CLOSING) - RemoveContactTextBox(event->hwndInput); + if (uType == MSG_WINDOW_EVT_OPEN) + AddContactTextBox(pDlg->m_hContact, pDlg->GetInput(), "DefaultSRMM", TRUE, pDlg->GetHwnd()); + else if (uType == MSG_WINDOW_EVT_CLOSING) + RemoveContactTextBox(pDlg->GetInput()); return 0; } -- cgit v1.2.3