diff options
author | George Hazan <ghazan@miranda.im> | 2021-05-15 23:01:52 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-05-15 23:01:52 +0300 |
commit | 615afbd839b22a7a170c477481ef67e5603b9709 (patch) | |
tree | 60e94f6264420b630edf11b424cea2e8beb9370d /plugins/Scriver | |
parent | d58ff2a433bb441aef9c8f87de14cf27594baaf9 (diff) |
SetDraw(bool bEnable) - a wrapper for WM_SETREDRAW command
Diffstat (limited to 'plugins/Scriver')
-rw-r--r-- | plugins/Scriver/src/msgdialog.cpp | 4 | ||||
-rw-r--r-- | plugins/Scriver/src/msglog.cpp | 14 | ||||
-rw-r--r-- | plugins/Scriver/src/msgutils.cpp | 4 |
3 files changed, 11 insertions, 11 deletions
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index 2603cfec25..c8b0f89f2e 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -877,9 +877,9 @@ LRESULT CMsgDialog::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam) }
if (wParam == VK_TAB && !isCtrl && !isShift) { // tab-autocomplete
- m_message.SendMsg(WM_SETREDRAW, FALSE, 0);
+ m_message.SetDraw(false);
TabAutoComplete();
- m_message.SendMsg(WM_SETREDRAW, TRUE, 0);
+ m_message.SetDraw(true);
RedrawWindow(m_nickList.GetHwnd(), nullptr, nullptr, RDW_INVALIDATE);
return 0;
}
diff --git a/plugins/Scriver/src/msglog.cpp b/plugins/Scriver/src/msglog.cpp index 8e2e2c40ac..062657a3ac 100644 --- a/plugins/Scriver/src/msglog.cpp +++ b/plugins/Scriver/src/msglog.cpp @@ -740,7 +740,7 @@ void CLogWindow::Attach() void CLogWindow::LogEvents(MEVENT hDbEventFirst, int count, bool bAppend)
{
CHARRANGE oldSel, sel;
- m_rtf.SendMsg(WM_SETREDRAW, FALSE, 0);
+ m_rtf.SetDraw(false);
m_rtf.SendMsg(EM_EXGETSEL, 0, (LPARAM)&oldSel);
LogStreamData streamData = {};
@@ -779,7 +779,7 @@ void CLogWindow::LogEvents(MEVENT hDbEventFirst, int count, bool bAppend) m_rtf.SendMsg(EM_EXSETSEL, 0, (LPARAM)&sel);
}
else {
- m_rtf.SendMsg(WM_SETREDRAW, FALSE, 0);
+ m_rtf.SetDraw(false);
m_rtf.SetTextA("");
sel.cpMin = 0;
sel.cpMax = m_rtf.GetRichTextLength();
@@ -819,7 +819,7 @@ void CLogWindow::LogEvents(MEVENT hDbEventFirst, int count, bool bAppend) CallService(MS_SMILEYADD_REPLACESMILEYS, 0, (LPARAM)&smre);
}
- m_rtf.SendMsg(WM_SETREDRAW, TRUE, 0);
+ m_rtf.SetDraw(true);
if (bottomScroll) {
ScrollToBottom();
RedrawWindow(m_rtf.GetHwnd(), nullptr, nullptr, RDW_INVALIDATE | RDW_UPDATENOW);
@@ -861,7 +861,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();
@@ -878,7 +878,7 @@ void CLogWindow::LogEvents(LOGINFO *lin, bool bRedraw) // get the number of pixels per logical inch
bool bFlag = false;
if (bRedraw) {
- m_rtf.SendMsg(WM_SETREDRAW, FALSE, 0);
+ m_rtf.SetDraw(false);
bFlag = true;
}
@@ -913,7 +913,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);
}
@@ -921,7 +921,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);
}
}
diff --git a/plugins/Scriver/src/msgutils.cpp b/plugins/Scriver/src/msgutils.cpp index 663f5bfde8..60c89a3801 100644 --- a/plugins/Scriver/src/msgutils.cpp +++ b/plugins/Scriver/src/msgutils.cpp @@ -431,7 +431,7 @@ void CMsgDialog::UpdateIcon() void CMsgDialog::UpdateNickList() { - m_nickList.SendMsg(WM_SETREDRAW, FALSE, 0); + m_nickList.SetDraw(false); m_nickList.ResetContent(); for (auto &ui : m_si->getUserList()) { char szIndicator = SM_GetStatusIndicator(m_si, ui); @@ -442,7 +442,7 @@ void CMsgDialog::UpdateNickList() } else m_nickList.AddString(ui->pszNick); } - m_nickList.SendMsg(WM_SETREDRAW, TRUE, 0); + m_nickList.SetDraw(true); InvalidateRect(m_nickList.GetHwnd(), nullptr, FALSE); UpdateWindow(m_nickList.GetHwnd()); UpdateTitle(); |