From 3583900b177ae00410e725c1148ba8d636682186 Mon Sep 17 00:00:00 2001 From: Brock Mammen Date: Sat, 3 Aug 2019 12:04:50 -0500 Subject: [PATCH] [SHELLFIND] Move window message constants to header file --- dll/win32/browseui/shellfind/CSearchBar.cpp | 6 ++---- dll/win32/browseui/shellfind/shellfind.h | 11 +++++++++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/dll/win32/browseui/shellfind/CSearchBar.cpp b/dll/win32/browseui/shellfind/CSearchBar.cpp index 6c9a35aad61..49d6f87b846 100644 --- a/dll/win32/browseui/shellfind/CSearchBar.cpp +++ b/dll/win32/browseui/shellfind/CSearchBar.cpp @@ -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; diff --git a/dll/win32/browseui/shellfind/shellfind.h b/dll/win32/browseui/shellfind/shellfind.h index 9133bdf01f5..0105d34d996 100644 --- a/dll/win32/browseui/shellfind/shellfind.h +++ b/dll/win32/browseui/shellfind/shellfind.h @@ -26,4 +26,15 @@ #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_ */