ReactOS 0.4.15-dev-8235-gcd88a97
CFolderOptions.h
Go to the documentation of this file.
1/*
2 * Folder options.
3 *
4 * Copyright (C) 2016 Mark Jansen
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#ifndef _CFOLDEROPTIONS_H_
22#define _CFOLDEROPTIONS_H_
23
25 public CComCoClass<CFolderOptions, &CLSID_ShellFldSetExt>,
26 public CComObjectRootEx<CComMultiThreadModelNoCS>,
27 public IShellPropSheetExt,
28 public IShellExtInit,
29 public IObjectWithSite
30{
31 private:
32 CComPtr<IUnknown> m_pSite;
33 //LPITEMIDLIST pidl;
34 //INT iIdEmpty;
35 //UINT cfShellIDList;
36 //void SF_RegisterClipFmt();
37 //BOOL fAcceptFmt; /* flag for pending Drop */
38 //BOOL QueryDrop (DWORD dwKeyState, LPDWORD pdwEffect);
39 //BOOL RecycleBinIsEmpty();
40
41 protected:
44
45 public:
48
49 // IShellPropSheetExt
51 STDMETHOD(ReplacePage)(EXPPS uPageID, LPFNSVADDPROPSHEETPAGE pfnReplaceWith, LPARAM lParam) override;
52
53 // IShellExtInit
54 STDMETHOD(Initialize)(PCIDLIST_ABSOLUTE pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID) override;
55
56 // IObjectWithSite
57 STDMETHOD(SetSite)(IUnknown *pUnkSite) override;
58 STDMETHOD(GetSite)(REFIID riid, void **ppvSite) override;
59
61 {
63 }
64 HRESULT ApplyDefFolderSettings(bool ResetToDefault)
65 {
66 return HandleDefFolderSettings(ResetToDefault ? DFSA_RESET : DFSA_APPLY);
67 }
68
71
73
75 COM_INTERFACE_ENTRY_IID(IID_IShellPropSheetExt, IShellPropSheetExt)
76 COM_INTERFACE_ENTRY_IID(IID_IShellExtInit, IShellExtInit)
79};
80
81#endif /* _CFOLDEROPTIONS_H_ */
#define STDMETHOD(m)
Definition: basetyps.h:62
STDMETHOD() AddPages(LPFNSVADDPROPSHEETPAGE pfnAddPage, LPARAM lParam) override
HRESULT HandleDefFolderSettings(int Action)
STDMETHOD() GetSite(REFIID riid, void **ppvSite) override
bool CanSetDefFolderSettings()
CComPtr< IUnknown > m_pSite
HRESULT ApplyDefFolderSettings(bool ResetToDefault)
STDMETHOD() SetSite(IUnknown *pUnkSite) override
STDMETHOD() ReplacePage(EXPPS uPageID, LPFNSVADDPROPSHEETPAGE pfnReplaceWith, LPARAM lParam) override
LPARAM lParam
Definition: combotst.c:139
REFIID riid
Definition: atlbase.h:39
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define BEGIN_COM_MAP(x)
Definition: atlcom.h:581
#define COM_INTERFACE_ENTRY_IID(iid, x)
Definition: atlcom.h:601
#define DECLARE_PROTECT_FINAL_CONSTRUCT()
Definition: atlcom.h:679
#define DECLARE_NOT_AGGREGATABLE(x)
Definition: atlcom.h:651
#define DECLARE_REGISTRY_RESOURCEID(x)
Definition: atlcom.h:645
#define END_COM_MAP()
Definition: atlcom.h:592
const IID IID_IObjectWithSite
#define REFIID
Definition: guiddef.h:118
LPARAM LPFNSVADDPROPSHEETPAGE
Definition: shobjidl.idl:117
#define IDR_FOLDEROPTIONS
Definition: shresdef.h:889
_In_ WDFIOTARGET _In_ _Strict_type_match_ WDF_IO_TARGET_SENT_IO_ACTION Action
Definition: wdfiotarget.h:510
LONG_PTR LPARAM
Definition: windef.h:208
static void Initialize()
Definition: xlate.c:212