f7590fd4aac86e890f3534013d81bc2e54ed5699
[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 IPersistFolder2
13 {
14 // *** IShellFolder2 methods ***
15 STDMETHODIMP GetDefaultSearchGUID(GUID *pguid);
16
17 STDMETHODIMP EnumSearches(IEnumExtraSearch **ppenum);
18
19 STDMETHODIMP GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay);
20
21 STDMETHODIMP GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags);
22
23 STDMETHODIMP GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv);
24
25 STDMETHODIMP GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *pDetails);
26
27 STDMETHODIMP MapColumnToSCID(UINT iColumn, SHCOLUMNID *pscid);
28
29
30 // *** IShellFolder methods ***
31 STDMETHODIMP ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, ULONG *pchEaten,
32 PIDLIST_RELATIVE *ppidl, ULONG *pdwAttributes);
33
34 STDMETHODIMP EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList);
35
36 STDMETHODIMP BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
37
38 STDMETHODIMP BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
39
40 STDMETHODIMP CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2);
41
42 STDMETHODIMP CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut);
43
44 STDMETHODIMP GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut);
45
46 STDMETHODIMP GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT *prgfInOut,
47 LPVOID *ppvOut);
48
49 STDMETHODIMP GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET pName);
50
51 STDMETHODIMP SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags,
52 PITEMID_CHILD *pPidlOut);
53
54 private:
55 LPITEMIDLIST m_pidl;
56
57 //// *** IPersistFolder2 methods ***
58 STDMETHODIMP GetCurFolder(LPITEMIDLIST *pidl);
59
60
61 // *** IPersistFolder methods ***
62 STDMETHODIMP Initialize(LPCITEMIDLIST pidl);
63
64
65 // *** IPersist methods ***
66 STDMETHODIMP GetClassID(CLSID *pClassId);
67
68 public:
69 DECLARE_REGISTRY_RESOURCEID(IDR_FINDFOLDER)
70
71 DECLARE_NOT_AGGREGATABLE(CFindFolder)
72
73 DECLARE_PROTECT_FINAL_CONSTRUCT()
74
75 BEGIN_COM_MAP(CFindFolder)
76 COM_INTERFACE_ENTRY_IID(IID_IShellFolder2, IShellFolder2)
77 COM_INTERFACE_ENTRY_IID(IID_IShellFolder, IShellFolder)
78 COM_INTERFACE_ENTRY_IID(IID_IPersistFolder2, IPersistFolder2)
79 COM_INTERFACE_ENTRY_IID(IID_IPersistFolder, IPersistFolder)
80 COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist)
81 END_COM_MAP()
82 };
83