[SHELL32] Use the correct flags with ListView's GetNextItem()

LVIS_* -> LVNI_*
This commit is contained in:
Hermès Bélusca-Maïto 2024-09-19 17:25:36 +02:00
parent d4815873fe
commit 058a67cb4a
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0

View file

@ -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