https://git.reactos.org/?p=reactos.git;a=commitdiff;h=058a67cb4a7eef2858536…
commit 058a67cb4a7eef2858536528c1659eadd23d0b6a
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Thu Sep 19 17:25:36 2024 +0200
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Thu Sep 19 18:44:37 2024 +0200
[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