From 6b3d56dbdccc4b608d258a4a7705514e46947e28 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 5 Apr 2017 20:18:35 +0300 Subject: SRMM* plugins switched to CCtrlRichEdit --- plugins/Scriver/src/chat_log.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/Scriver/src/chat_log.cpp') diff --git a/plugins/Scriver/src/chat_log.cpp b/plugins/Scriver/src/chat_log.cpp index 3d8ea3eb55..34ca7d665f 100644 --- a/plugins/Scriver/src/chat_log.cpp +++ b/plugins/Scriver/src/chat_log.cpp @@ -39,7 +39,7 @@ void CChatRoomDlg::StreamInEvents(LOGINFO* lin, bool bRedraw) streamData.si = m_si; streamData.lin = lin; streamData.bStripFormat = FALSE; - streamData.isFirst = bRedraw ? 1 : (GetRichTextLength(m_log.GetHwnd(), CP_ACP, FALSE) == 0); + streamData.isFirst = bRedraw ? 1 : m_log.GetRichTextLength() == 0; EDITSTREAM stream = { 0 }; stream.pfnCallback = Srmm_LogStreamCallback; @@ -60,7 +60,7 @@ void CChatRoomDlg::StreamInEvents(LOGINFO* lin, bool bRedraw) m_log.SendMsg(WM_SETREDRAW, FALSE, 0); // set the insertion point at the bottom - sel.cpMin = sel.cpMax = GetRichTextLength(m_log.GetHwnd(), CP_ACP, FALSE); + sel.cpMin = sel.cpMax = m_log.GetRichTextLength(); m_log.SendMsg(EM_EXSETSEL, 0, (LPARAM)&sel); m_log.SendMsg(EM_EXGETSEL, 0, (LPARAM)&sel); @@ -115,7 +115,7 @@ void CChatRoomDlg::StreamInEvents(LOGINFO* lin, bool bRedraw) // need to invalidate the window if (bFlag) { - sel.cpMin = sel.cpMax = GetRichTextLength(m_log.GetHwnd(), CP_ACP, FALSE); + sel.cpMin = sel.cpMax = m_log.GetRichTextLength(); m_log.SendMsg(EM_EXSETSEL, 0, (LPARAM)&sel); m_log.SendMsg(WM_SETREDRAW, TRUE, 0); InvalidateRect(m_log.GetHwnd(), nullptr, TRUE); -- cgit v1.2.3