34f6165acdf9fec5f23956395dbc48c6fd127bf0
[reactos.git] / dll / win32 / browseui / shellfind / CFindFolder.h
1 #pragma once
2
3 #include "shellfind.h"
4
5 #define SWM_ADD_ITEM (WM_USER + 0)
6 #define SWM_UPDATE_STATUS (WM_USER + 1)
7
8 class CFindFolder :
9 public CComCoClass<CFindFolder, &CLSID_FindFolder>,
10 public CComObjectRootEx<CComMultiThreadModelNoCS>,
11 public IShellFolder2,
12 public IShellFolderViewCB,
13 public IPersistFolder2
14 {
15 // *** IShellFolder2 methods ***
16 STDMETHODIMP GetDefaultSearchGUID(GUID *pguid);
17
18 STDMETHODIMP EnumSearches(IEnumExtraSearch **ppenum);
19
20 STDMETHODIMP GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay);
21
22 STDMETHODIMP GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags);
23
24 STDMETHODIMP GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv);
25
26 STDMETHODIMP GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *pDetails);
27
28 STDMETHODIMP MapColumnToSCID(UINT iColumn, SHCOLUMNID *pscid);
29
30
31 // *** IShellFolder methods ***
32 STDMETHODIMP ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, ULONG *pchEaten,
33 PIDLIST_RELATIVE *ppidl, ULONG *pdwAttributes);
34
35 STDMETHODIMP EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList);
36
37 STDMETHODIMP BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
38
39 STDMETHODIMP BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
40
41 STDMETHODIMP CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2);
42
43 STDMETHODIMP CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut);
44
45 STDMETHODIMP GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut);
46
47 STDMETHODIMP GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT *prgfInOut,
48 LPVOID *ppvOut);
49
50 STDMETHODIMP GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET pName);
51
52 STDMETHODIMP SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags,
53 PITEMID_CHILD *pPidlOut);
54
55 //// *** IShellFolderViewCB methods ***
56 STDMETHODIMP MessageSFVCB(UINT uMsg, WPARAM wParam, LPARAM lParam);
57
58 private:
59 LPITEMIDLIST m_pidl;
60 CComPtr<IShellFolder2> m_pisfInner;
61
62 //// *** IPersistFolder2 methods ***
63 STDMETHODIMP GetCurFolder(LPITEMIDLIST *pidl);
64
65
66 // *** IPersistFolder methods ***
67 STDMETHODIMP Initialize(LPCITEMIDLIST pidl);
68
69
70 // *** IPersist methods ***
71 STDMETHODIMP GetClassID(CLSID *pClassId);
72
73 public:
74 DECLARE_REGISTRY_RESOURCEID(IDR_FINDFOLDER)
75
76 DECLARE_NOT_AGGREGATABLE(CFindFolder)
77
78 DECLARE_PROTECT_FINAL_CONSTRUCT()
79
80 BEGIN_COM_MAP(CFindFolder)
81 COM_INTERFACE_ENTRY_IID(IID_IShellFolder2, IShellFolder2)
82 COM_INTERFACE_ENTRY_IID(IID_IShellFolder, IShellFolder)
83 COM_INTERFACE_ENTRY_IID(IID_IShellFolderViewCB, IShellFolderViewCB)
84 COM_INTERFACE_ENTRY_IID(IID_IPersistFolder2, IPersistFolder2)
85 COM_INTERFACE_ENTRY_IID(IID_IPersistFolder, IPersistFolder)
86 COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist)
87 END_COM_MAP()
88 };
89