https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5525c81b2f0663cfabff3…
commit 5525c81b2f0663cfabff3773d8099c5f7cdcf3ab
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Mon Dec 17 19:22:31 2018 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Mon Dec 17 19:22:31 2018 +0900
[SHELL32] Add CDefView::DefMessageSFVCB (Retrial of #1145) (#1151)
CORE-14976
---
dll/win32/shell32/CDefView.cpp | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/dll/win32/shell32/CDefView.cpp b/dll/win32/shell32/CDefView.cpp
index 640bb143ff..b382dcd31f 100644
--- a/dll/win32/shell32/CDefView.cpp
+++ b/dll/win32/shell32/CDefView.cpp
@@ -128,6 +128,7 @@ class CDefView :
BOOL CreateList();
void UpdateListColors();
BOOL InitList();
+ HRESULT DefMessageSFVCB(UINT uMsg, WPARAM wParam, LPARAM lParam);
static INT CALLBACK ListViewCompareItems(LPARAM lParam1, LPARAM lParam2, LPARAM
lpData);
PCUITEMID_CHILD _PidlByItem(int i);
@@ -3263,13 +3264,29 @@ HRESULT CDefView::_MergeToolbar()
return S_OK;
}
+// The default processing of IShellFolderView callbacks
+HRESULT CDefView::DefMessageSFVCB(UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ // TODO: SFVM_GET_CUSTOMVIEWINFO, SFVM_WINDOWCREATED
+ TRACE("CDefView::DefMessageSFVCB uMsg=%u\n", uMsg);
+ return E_NOTIMPL;
+}
+
HRESULT CDefView::_DoFolderViewCB(UINT uMsg, WPARAM wParam, LPARAM lParam)
{
+ HRESULT hr = E_NOTIMPL;
+
if (m_pShellFolderViewCB)
{
- return m_pShellFolderViewCB->MessageSFVCB(uMsg, wParam, lParam);
+ hr = m_pShellFolderViewCB->MessageSFVCB(uMsg, wParam, lParam);
}
- return E_NOINTERFACE;
+
+ if (hr == E_NOTIMPL)
+ {
+ hr = DefMessageSFVCB(uMsg, wParam, lParam);
+ }
+
+ return hr;
}
HRESULT CDefView_CreateInstance(IShellFolder *pFolder, REFIID riid, LPVOID * ppvOut)