From 615afbd839b22a7a170c477481ef67e5603b9709 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 15 May 2021 23:01:52 +0300 Subject: SetDraw(bool bEnable) - a wrapper for WM_SETREDRAW command --- plugins/Clist_modern/src/modern_viewmodebar.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'plugins/Clist_modern') diff --git a/plugins/Clist_modern/src/modern_viewmodebar.cpp b/plugins/Clist_modern/src/modern_viewmodebar.cpp index b8f6c758d5..a9bcc83f1d 100644 --- a/plugins/Clist_modern/src/modern_viewmodebar.cpp +++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp @@ -420,29 +420,29 @@ class CViewModeSetupDlg : public CDlgBase pageChange = 1; if (pageChange) - SendMessage(m_hwnd, WM_SETREDRAW, FALSE, 0); + SetDraw(false); switch (page) { case 0: for (auto &ctrlId : _page1Controls) - ShowWindow(GetDlgItem(m_hwnd, ctrlId), SW_SHOW); + ::ShowWindow(GetDlgItem(m_hwnd, ctrlId), SW_SHOW); for (auto &ctrlId : _page2Controls) - ShowWindow(GetDlgItem(m_hwnd, ctrlId), SW_HIDE); + ::ShowWindow(GetDlgItem(m_hwnd, ctrlId), SW_HIDE); break; case 1: for (auto &ctrlId : _page1Controls) - ShowWindow(GetDlgItem(m_hwnd, ctrlId), SW_HIDE); + ::ShowWindow(GetDlgItem(m_hwnd, ctrlId), SW_HIDE); for (auto &ctrlId : _page2Controls) - ShowWindow(GetDlgItem(m_hwnd, ctrlId), SW_SHOW); + ::ShowWindow(GetDlgItem(m_hwnd, ctrlId), SW_SHOW); break; } if (pageChange) { - SendMessage(m_hwnd, WM_SETREDRAW, TRUE, 0); - RedrawWindow(m_hwnd, nullptr, nullptr, RDW_ERASE | RDW_INVALIDATE); + SetDraw(true); + ::RedrawWindow(m_hwnd, nullptr, nullptr, RDW_ERASE | RDW_INVALIDATE); } } -- cgit v1.2.3