mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 09:23:06 +00:00
[SHELLFIND] Add stop search command
This commit is contained in:
parent
41d7b3700d
commit
41f9ad120d
3 changed files with 16 additions and 5 deletions
|
@ -266,6 +266,16 @@ LRESULT CFindFolder::StartSearch(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LRESULT CFindFolder::StopSearch(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
|
||||||
|
{
|
||||||
|
if (m_hStopEvent)
|
||||||
|
{
|
||||||
|
SetEvent(m_hStopEvent);
|
||||||
|
m_hStopEvent = NULL;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
LRESULT CFindFolder::AddResult(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
|
LRESULT CFindFolder::AddResult(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
|
||||||
{
|
{
|
||||||
if (!lParam)
|
if (!lParam)
|
||||||
|
|
|
@ -2,9 +2,6 @@
|
||||||
|
|
||||||
#include "shellfind.h"
|
#include "shellfind.h"
|
||||||
|
|
||||||
#define SWM_ADD_ITEM (WM_USER + 0)
|
|
||||||
#define SWM_UPDATE_STATUS (WM_USER + 1)
|
|
||||||
|
|
||||||
class CFindFolder :
|
class CFindFolder :
|
||||||
public CWindowImpl<CFindFolder>,
|
public CWindowImpl<CFindFolder>,
|
||||||
public CComCoClass<CFindFolder, &CLSID_FindFolder>,
|
public CComCoClass<CFindFolder, &CLSID_FindFolder>,
|
||||||
|
@ -87,6 +84,8 @@ private:
|
||||||
// *** Message handlers ***
|
// *** Message handlers ***
|
||||||
LRESULT StartSearch(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
|
LRESULT StartSearch(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
|
||||||
|
|
||||||
|
LRESULT StopSearch(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
|
||||||
|
|
||||||
LRESULT AddResult(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
|
LRESULT AddResult(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
|
||||||
|
|
||||||
LRESULT UpdateStatus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
|
LRESULT UpdateStatus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
|
||||||
|
@ -106,6 +105,7 @@ public:
|
||||||
|
|
||||||
BEGIN_MSG_MAP(CFindFolder)
|
BEGIN_MSG_MAP(CFindFolder)
|
||||||
MESSAGE_HANDLER(WM_SEARCH_START, StartSearch)
|
MESSAGE_HANDLER(WM_SEARCH_START, StartSearch)
|
||||||
|
MESSAGE_HANDLER(WM_SEARCH_STOP, StopSearch)
|
||||||
MESSAGE_HANDLER(WM_SEARCH_ADD_RESULT, AddResult)
|
MESSAGE_HANDLER(WM_SEARCH_ADD_RESULT, AddResult)
|
||||||
MESSAGE_HANDLER(WM_SEARCH_UPDATE_STATUS, UpdateStatus)
|
MESSAGE_HANDLER(WM_SEARCH_UPDATE_STATUS, UpdateStatus)
|
||||||
END_MSG_MAP()
|
END_MSG_MAP()
|
||||||
|
|
|
@ -27,8 +27,9 @@
|
||||||
#include "../resource.h"
|
#include "../resource.h"
|
||||||
|
|
||||||
#define WM_SEARCH_START WM_USER + 0
|
#define WM_SEARCH_START WM_USER + 0
|
||||||
#define WM_SEARCH_ADD_RESULT WM_USER + 1
|
#define WM_SEARCH_STOP WM_USER + 1
|
||||||
#define WM_SEARCH_UPDATE_STATUS WM_USER + 2
|
#define WM_SEARCH_ADD_RESULT WM_USER + 2
|
||||||
|
#define WM_SEARCH_UPDATE_STATUS WM_USER + 3
|
||||||
|
|
||||||
struct SearchStart
|
struct SearchStart
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue