mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 00:45:24 +00:00
[SHELLFIND] Message handler for updating status bar text
This commit is contained in:
parent
2fdaa386d2
commit
04fcbe3202
2 changed files with 25 additions and 1 deletions
|
@ -111,6 +111,18 @@ LRESULT CFindFolder::AddItem(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHan
|
|||
return hr;
|
||||
}
|
||||
|
||||
LRESULT CFindFolder::UpdateStatus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
|
||||
{
|
||||
LPWSTR status = (LPWSTR) lParam;
|
||||
if (m_shellBrowser)
|
||||
{
|
||||
m_shellBrowser->SetStatusTextSB(status);
|
||||
}
|
||||
LocalFree(status);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
// *** IShellFolder2 methods ***
|
||||
STDMETHODIMP CFindFolder::GetDefaultSearchGUID(GUID *pguid)
|
||||
{
|
||||
|
@ -319,7 +331,14 @@ STDMETHODIMP CFindFolder::MessageSFVCB(UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
case SFVM_WINDOWCREATED:
|
||||
{
|
||||
SubclassWindow((HWND) wParam);
|
||||
return S_OK;
|
||||
|
||||
CComPtr<IServiceProvider> pServiceProvider;
|
||||
HRESULT hr = m_shellFolderView->QueryInterface(IID_PPV_ARG(IServiceProvider, &pServiceProvider));
|
||||
if (FAILED_UNEXPECTEDLY(hr))
|
||||
{
|
||||
return hr;
|
||||
}
|
||||
return pServiceProvider->QueryService(SID_SShellBrowser, IID_PPV_ARG(IShellBrowser, &m_shellBrowser));
|
||||
}
|
||||
}
|
||||
return E_NOTIMPL;
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include "shellfind.h"
|
||||
|
||||
#define SWM_ADD_ITEM (WM_USER + 0)
|
||||
#define SWM_UPDATE_STATUS (WM_USER + 1)
|
||||
|
||||
class CFindFolder :
|
||||
public CWindowImpl<CFindFolder>,
|
||||
|
@ -64,6 +65,7 @@ private:
|
|||
LPITEMIDLIST m_pidl;
|
||||
CComPtr<IShellFolder2> m_pisfInner;
|
||||
CComPtr<IShellFolderView> m_shellFolderView;
|
||||
CComPtr<IShellBrowser> m_shellBrowser;
|
||||
|
||||
//// *** IPersistFolder2 methods ***
|
||||
STDMETHODIMP GetCurFolder(LPITEMIDLIST *pidl);
|
||||
|
@ -78,6 +80,8 @@ private:
|
|||
|
||||
LRESULT AddItem(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
|
||||
|
||||
LRESULT UpdateStatus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
|
||||
|
||||
public:
|
||||
DECLARE_REGISTRY_RESOURCEID(IDR_FINDFOLDER)
|
||||
|
||||
|
@ -87,6 +91,7 @@ public:
|
|||
|
||||
BEGIN_MSG_MAP(CFindFolder)
|
||||
MESSAGE_HANDLER(SWM_ADD_ITEM, AddItem)
|
||||
MESSAGE_HANDLER(SWM_UPDATE_STATUS, UpdateStatus)
|
||||
END_MSG_MAP()
|
||||
|
||||
BEGIN_COM_MAP(CFindFolder)
|
||||
|
|
Loading…
Reference in a new issue