[SHELL32] CDefView: Implement SFVM_CANSELECTALL callback (#6945)
authorKatayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
Mon, 27 May 2024 00:05:44 +0000 (09:05 +0900)
committerGitHub <noreply@github.com>
Mon, 27 May 2024 00:05:44 +0000 (09:05 +0900)
Implementing missing folder view callbacks...
JIRA issue: CORE-19616
- Call SFVM_CANSELECTALL callback on FCIDM_SHVIEW_SELECTALL.
- If it returned S_FALSE, then do not select all.

dll/win32/shell32/CDefView.cpp

index 5c4b4a7..0e60f8e 100644 (file)
@@ -1983,7 +1983,8 @@ LRESULT CDefView::OnCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHand
                 AutoArrange();
             break;
         case FCIDM_SHVIEW_SELECTALL:
-            m_ListView.SetItemState(-1, LVIS_SELECTED, LVIS_SELECTED);
+            if (_DoFolderViewCB(SFVM_CANSELECTALL, 0, 0) != S_FALSE)
+                m_ListView.SetItemState(-1, LVIS_SELECTED, LVIS_SELECTED);
             break;
         case FCIDM_SHVIEW_INVERTSELECTION:
             nCount = m_ListView.GetItemCount();