summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-05-15 23:01:52 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-05-15 23:01:52 +0300
commit615afbd839b22a7a170c477481ef67e5603b9709 (patch)
tree60e94f6264420b630edf11b424cea2e8beb9370d /plugins/TabSRMM/src
parentd58ff2a433bb441aef9c8f87de14cf27594baaf9 (diff)
SetDraw(bool bEnable) - a wrapper for WM_SETREDRAW command
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp4
-rw-r--r--plugins/TabSRMM/src/msglog.cpp12
2 files changed, 8 insertions, 8 deletions
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp
index 9c5e2a4cc6..c872c9c44a 100644
--- a/plugins/TabSRMM/src/msgdialog.cpp
+++ b/plugins/TabSRMM/src/msgdialog.cpp
@@ -1842,9 +1842,9 @@ LRESULT CMsgDialog::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam)
if (PluginConfig.m_bAllowTab)
break;
- m_message.SendMsg(WM_SETREDRAW, FALSE, 0);
+ m_message.SetDraw(false);
bool fCompleted = TabAutoComplete();
- m_message.SendMsg(WM_SETREDRAW, TRUE, 0);
+ m_message.SetDraw(true);
RedrawWindow(m_message.GetHwnd(), nullptr, nullptr, RDW_INVALIDATE);
if (!fCompleted) {
if ((GetSendButtonState() != PBS_DISABLED))
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp
index 308729a68d..49d03fa2bd 100644
--- a/plugins/TabSRMM/src/msglog.cpp
+++ b/plugins/TabSRMM/src/msglog.cpp
@@ -1281,7 +1281,7 @@ void CLogWindow::LogEvents(MEVENT hDbEventFirst, int count, bool fAppend, DBEVEN
}
// begin to draw
- m_rtf.SendMsg(WM_SETREDRAW, FALSE, 0);
+ m_rtf.SetDraw(false);
m_rtf.SendMsg(EM_STREAMIN, fAppend ? SFF_SELECTION | SF_RTF : SFF_SELECTION | SF_RTF, (LPARAM)&stream);
m_pDlg.m_hDbEventLast = streamData.hDbEventLast;
@@ -1311,7 +1311,7 @@ void CLogWindow::LogEvents(MEVENT hDbEventFirst, int count, bool fAppend, DBEVEN
m_rtf.SendMsg(EM_HIDESELECTION, FALSE, 0);
- m_rtf.SendMsg(WM_SETREDRAW, TRUE, 0);
+ m_rtf.SetDraw(true);
InvalidateRect(m_rtf.GetHwnd(), nullptr, FALSE);
EnableWindow(GetDlgItem(m_pDlg.m_hwnd, IDC_QUOTE), m_pDlg.m_hDbEventLast != 0);
mir_free(streamData.buffer);
@@ -1347,7 +1347,7 @@ void CLogWindow::LogEvents(LOGINFO *lin, bool bRedraw)
CHARRANGE oldsel, sel, newsel;
m_rtf.SendMsg(EM_EXGETSEL, 0, (LPARAM)&oldsel);
if (oldsel.cpMax != oldsel.cpMin)
- m_rtf.SendMsg(WM_SETREDRAW, FALSE, 0);
+ m_rtf.SetDraw(false);
// set the insertion point at the bottom
sel.cpMin = sel.cpMax = m_rtf.GetRichTextLength();
@@ -1368,7 +1368,7 @@ void CLogWindow::LogEvents(LOGINFO *lin, bool bRedraw)
g_chatApi.logPixelSY = GetDeviceCaps(hdc, LOGPIXELSY);
g_chatApi.logPixelSX = GetDeviceCaps(hdc, LOGPIXELSX);
ReleaseDC(nullptr, hdc);
- m_rtf.SendMsg(WM_SETREDRAW, FALSE, 0);
+ m_rtf.SetDraw(false);
bFlag = true;
}
@@ -1460,7 +1460,7 @@ void CLogWindow::LogEvents(LOGINFO *lin, bool bRedraw)
// do we need to restore the selection
if (oldsel.cpMax != oldsel.cpMin) {
m_rtf.SendMsg(EM_EXSETSEL, 0, (LPARAM)&oldsel);
- m_rtf.SendMsg(WM_SETREDRAW, TRUE, 0);
+ m_rtf.SetDraw(true);
InvalidateRect(m_rtf.GetHwnd(), nullptr, TRUE);
}
@@ -1468,7 +1468,7 @@ void CLogWindow::LogEvents(LOGINFO *lin, bool bRedraw)
if (bFlag) {
sel.cpMin = sel.cpMax = m_rtf.GetRichTextLength();
m_rtf.SendMsg(EM_EXSETSEL, 0, (LPARAM)&sel);
- m_rtf.SendMsg(WM_SETREDRAW, TRUE, 0);
+ m_rtf.SetDraw(true);
InvalidateRect(m_rtf.GetHwnd(), nullptr, TRUE);
}
}