From 83b1ddb1ac3352011cb98c28878ebb777547b0fd Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 29 Oct 2023 12:48:12 +0300 Subject: code cleaning --- plugins/SmileyAdd/src/dlgboxsubclass.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'plugins/SmileyAdd/src') diff --git a/plugins/SmileyAdd/src/dlgboxsubclass.cpp b/plugins/SmileyAdd/src/dlgboxsubclass.cpp index 377b77c729..e35dca7109 100644 --- a/plugins/SmileyAdd/src/dlgboxsubclass.cpp +++ b/plugins/SmileyAdd/src/dlgboxsubclass.cpp @@ -126,6 +126,7 @@ static int MsgDlgHook(WPARAM uType, LPARAM lParam) { auto *pDlg = (CSrmmBaseDialog *)lParam; auto hwndLog = pDlg->log()->GetHwnd(); + auto hwndInput = pDlg->GetInput(); switch (uType) { case MSG_WINDOW_EVT_OPENING: @@ -137,21 +138,21 @@ static int MsgDlgHook(WPARAM uType, LPARAM lParam) g_MsgWndList.insert(msgwnd); } - SetRichOwnerCallback(pDlg->GetHwnd(), pDlg->GetInput(), hwndLog); + SetRichOwnerCallback(pDlg->GetHwnd(), hwndInput, hwndLog); if (hwndLog) SetRichCallback(hwndLog, pDlg->m_hContact, false, false); - if (pDlg->GetInput()) - SetRichCallback(pDlg->GetInput(), pDlg->m_hContact, false, false); + if (hwndInput) + SetRichCallback(hwndInput, pDlg->m_hContact, false, false); break; case MSG_WINDOW_EVT_OPEN: - SetRichOwnerCallback(pDlg->GetHwnd(), pDlg->GetInput(), hwndLog); + SetRichOwnerCallback(pDlg->GetHwnd(), hwndInput, hwndLog); if (hwndLog) SetRichCallback(hwndLog, pDlg->m_hContact, true, true); - if (pDlg->GetInput()) { - SetRichCallback(pDlg->GetInput(), pDlg->m_hContact, true, true); - SendMessage(pDlg->GetInput(), WM_REMAKERICH, 0, 0); + if (hwndInput) { + SetRichCallback(hwndInput, pDlg->m_hContact, true, true); + SendMessage(hwndInput, WM_REMAKERICH, 0, 0); } break; -- cgit v1.2.3