From c6f59d75142b7568dd89f5cff691b0b58030aafd Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 25 Sep 2023 13:41:55 +0300 Subject: SmileyAdd: fix for the obsolete quirks in SmaileyAdd API --- plugins/TabSRMM/src/infopanel.cpp | 2 +- plugins/TabSRMM/src/msgdlgother.cpp | 7 +++---- plugins/TabSRMM/src/msglog.cpp | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) (limited to 'plugins/TabSRMM/src') diff --git a/plugins/TabSRMM/src/infopanel.cpp b/plugins/TabSRMM/src/infopanel.cpp index 5cf4751391..ee62c0b288 100644 --- a/plugins/TabSRMM/src/infopanel.cpp +++ b/plugins/TabSRMM/src/infopanel.cpp @@ -1350,7 +1350,7 @@ void CTip::show(const RECT& rc, POINT& pt, const HICON hIcon, const wchar_t *szT CContactCache *c = CContactCache::getContactCache(m_hContact); ::SendMessage(m_hRich, EM_SETBKGNDCOLOR, 0, (LPARAM)PluginConfig.m_ipBackgroundGradientHigh); - SMADD_RICHEDIT3 smadd = { sizeof(smadd) }; + SMADD_RICHEDIT smadd = {}; smadd.hwndRichEditControl = m_hRich; smadd.Protocolname = const_cast(c->getActiveProto()); smadd.hContact = c->getActiveContact(); diff --git a/plugins/TabSRMM/src/msgdlgother.cpp b/plugins/TabSRMM/src/msgdlgother.cpp index 7816293863..ce2a2d32e6 100644 --- a/plugins/TabSRMM/src/msgdlgother.cpp +++ b/plugins/TabSRMM/src/msgdlgother.cpp @@ -931,11 +931,10 @@ ok: if (PluginConfig.g_SmileyAddAvail && (endmark > (beginmark + 1))) { CMStringW smcode = msg.Mid(beginmark, (endmark - beginmark) + 1); - SMADD_BATCHPARSE2 smbp = {}; - smbp.cbSize = sizeof(smbp); + SMADD_BATCHPARSE smbp = {}; smbp.Protocolname = m_cache->getActiveProto(); - smbp.flag = SAFL_TCHAR | SAFL_PATH | (isSent ? SAFL_OUTGOING : 0); - smbp.str = (wchar_t*)smcode.c_str(); + smbp.flag = SAFL_UNICODE | SAFL_PATH | (isSent ? SAFL_OUTGOING : 0); + smbp.str.w = smcode.c_str(); smbp.hContact = m_hContact; SMADD_BATCHPARSERES *smbpr = (SMADD_BATCHPARSERES *)CallService(MS_SMILEYADD_BATCHPARSE, 0, (LPARAM)&smbp); diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp index ffbb75e694..352063b2dd 100644 --- a/plugins/TabSRMM/src/msglog.cpp +++ b/plugins/TabSRMM/src/msglog.cpp @@ -1326,7 +1326,7 @@ void CLogWindow::LogChatEvents(const LOGINFO *lin) if (newsel.cpMin < 0) newsel.cpMin = 0; - SMADD_RICHEDIT3 sm = { sizeof(sm) }; + SMADD_RICHEDIT sm = {}; sm.hwndRichEditControl = m_rtf.GetHwnd(); sm.Protocolname = si->pszModule; sm.rangeToReplace = bRedraw ? nullptr : &newsel; @@ -1467,7 +1467,7 @@ void CLogWindow::ReplaceIcons(LONG startAt, int fAppend, BOOL isSent) sel.cpMin = startAt; sel.cpMax = -1; - SMADD_RICHEDIT3 smadd = { sizeof(smadd) }; + SMADD_RICHEDIT smadd = {}; smadd.hwndRichEditControl = m_rtf.GetHwnd(); smadd.Protocolname = const_cast(m_pDlg.m_cache->getActiveProto()); smadd.hContact = m_pDlg.m_cache->getActiveContact(); -- cgit v1.2.3