[SHELLFIND] Move window message constants to header file
authorBrock Mammen <brockmammen@gmail.com>
Sat, 3 Aug 2019 17:04:50 +0000 (12:04 -0500)
committerGiannis Adamopoulos <gadamopoulos@reactos.org>
Sun, 15 Sep 2019 16:46:36 +0000 (19:46 +0300)
dll/win32/browseui/shellfind/CSearchBar.cpp
dll/win32/browseui/shellfind/shellfind.h

index 6c9a35a..49d6f87 100644 (file)
@@ -200,8 +200,7 @@ LRESULT CSearchBar::OnSearchButtonClicked(WORD wNotifyCode, WORD wID, HWND hWndC
 
     GetSearchResultsFolder(&pShellBrowser, &hwnd, NULL);
     if (hwnd)
-        // TODO: Use message ID in header file
-        ::PostMessageW(hwnd, WM_USER + 1, 0, (LPARAM) StrDupW(L"Starting search..."));
+    ::PostMessageW(hwnd, WM_SEARCH_START, 0, (LPARAM) StrDupW(L"Starting search..."));
 
     return S_OK;
 }
@@ -213,8 +212,7 @@ LRESULT CSearchBar::OnClicked(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHa
     if (SUCCEEDED(hr))
     {
         LPCWSTR path = L"C:\\readme.txt";
-        // TODO: Use message ID in header file
-        ::PostMessageW(hwnd, WM_USER, 0, (LPARAM) StrDupW(path));
+        ::PostMessageW(hwnd, WM_SEARCH_ADD_RESULT, 0, (LPARAM) StrDupW(path));
     }
 
     return 0;
index 9133bdf..0105d34 100644 (file)
 
 #include "../resource.h"
 
+#define WM_SEARCH_START          WM_USER + 0
+#define WM_SEARCH_ADD_RESULT     WM_USER + 1
+#define WM_SEARCH_UPDATE_STATUS  WM_USER + 2
+
+struct SearchStart
+{
+    WCHAR szPath[MAX_PATH];
+    WCHAR szFileName[MAX_PATH];
+    WCHAR szQuery[MAX_PATH];
+};
+
 #endif /* _SHELLFIND_PCH_ */