From 058a67cb4a7eef2858536528c1659eadd23d0b6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Thu, 19 Sep 2024 17:25:36 +0200 Subject: [PATCH] [SHELL32] Use the correct flags with ListView's GetNextItem() LVIS_* -> LVNI_* --- dll/win32/shell32/CDefView.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dll/win32/shell32/CDefView.cpp b/dll/win32/shell32/CDefView.cpp index a963f55e044..3344ebfe0e5 100644 --- a/dll/win32/shell32/CDefView.cpp +++ b/dll/win32/shell32/CDefView.cpp @@ -2045,7 +2045,7 @@ UINT CDefView::GetSelections() UINT i = 0; int lvIndex = -1; - while ((lvIndex = m_ListView.GetNextItem(lvIndex, LVNI_SELECTED)) > -1) + while ((lvIndex = m_ListView.GetNextItem(lvIndex, LVNI_SELECTED)) > -1) { m_apidl[i] = _PidlByItem(lvIndex); i++; @@ -2212,10 +2212,10 @@ LRESULT CDefView::OnContextMenu(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &b if (hFocus == m_ListView.m_hWnd || m_ListView.IsChild(hFocus)) { // Is there an item focused and selected? - lvIndex = m_ListView.GetNextItem(-1, LVIS_SELECTED|LVIS_FOCUSED); + lvIndex = m_ListView.GetNextItem(-1, LVNI_SELECTED | LVNI_FOCUSED); // If not, find the first selected item if (lvIndex < 0) - lvIndex = m_ListView.GetNextItem(-1, LVIS_SELECTED); + lvIndex = m_ListView.GetNextItem(-1, LVNI_SELECTED); } // We got something