[SHELLFIND] Message handler for adding search results
authorBrock Mammen <brockmammen@gmail.com>
Fri, 19 Jul 2019 22:06:16 +0000 (17:06 -0500)
committerGiannis Adamopoulos <gadamopoulos@reactos.org>
Sun, 15 Sep 2019 16:46:36 +0000 (19:46 +0300)
dll/win32/browseui/shellfind/CFindFolder.cpp
dll/win32/browseui/shellfind/CFindFolder.h

index 7983ee7..f0c2d5e 100644 (file)
@@ -273,6 +273,11 @@ STDMETHODIMP CFindFolder::MessageSFVCB(UINT uMsg, WPARAM wParam, LPARAM lParam)
             *pViewMode = FVM_DETAILS;
             return S_OK;
         }
+        case SFVM_WINDOWCREATED:
+        {
+            SubclassWindow((HWND) wParam);
+            return S_OK;
+        }
     }
     return E_NOTIMPL;
 }
index c9aa530..a63efbc 100644 (file)
@@ -3,9 +3,9 @@
 #include "shellfind.h"
 
 #define SWM_ADD_ITEM (WM_USER + 0)
-#define SWM_UPDATE_STATUS (WM_USER + 1)
 
 class CFindFolder :
+        public CWindowImpl<CFindFolder>,
         public CComCoClass<CFindFolder, &CLSID_FindFolder>,
         public CComObjectRootEx<CComMultiThreadModelNoCS>,
         public IShellFolder2,
@@ -80,6 +80,10 @@ public:
 
     DECLARE_PROTECT_FINAL_CONSTRUCT()
 
+    BEGIN_MSG_MAP(CFindFolder)
+        MESSAGE_HANDLER(SWM_ADD_ITEM, AddItem)
+    END_MSG_MAP()
+
     BEGIN_COM_MAP(CFindFolder)
         COM_INTERFACE_ENTRY_IID(IID_IShellFolder2, IShellFolder2)
         COM_INTERFACE_ENTRY_IID(IID_IShellFolder, IShellFolder)