[SHELL32] CDefView: Implement SFVM_COLUMNCLICK callback (#6943)
authorKatayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
Sun, 26 May 2024 22:35:20 +0000 (07:35 +0900)
committerGitHub <noreply@github.com>
Sun, 26 May 2024 22:35:20 +0000 (07:35 +0900)
Implementing missing folder view callbacks...
JIRA issue: CORE-19616
- Call _DoFolderViewCB on LVN_COLUMNCLICK.
- If it returned S_OK, then don't sort items.

dll/win32/shell32/CDefView.cpp

index 93afb74..5c4b4a7 100644 (file)
@@ -2117,7 +2117,8 @@ LRESULT CDefView::OnNotify(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandl
                 m_sortInfo.bIsAscending = !m_sortInfo.bIsAscending;
             else
                 m_sortInfo.bIsAscending = TRUE;
-            _Sort();
+            if (_DoFolderViewCB(SFVM_COLUMNCLICK, lpnmlv->iSubItem, 0) != S_OK)
+                _Sort();
             break;
         case LVN_GETDISPINFOA:
         case LVN_GETDISPINFOW: