ReactOS  0.4.15-dev-440-g5f37b68
CFolderOptions.cpp
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 #include <precomp.h>
22 
23 
25 
27  :m_pSite(NULL)
28 {
29 }
30 
32 {
33 }
34 
35 /*************************************************************************
36  * FolderOptions IShellPropSheetExt interface
37  */
38 
42 
44 {
46 
47  if (hPage == NULL)
48  {
49  ERR("Failed to create property sheet page FolderOptionsGeneral\n");
50  return E_FAIL;
51  }
52  if (!pfnAddPage(hPage, lParam))
53  return E_FAIL;
54 
56  if (hPage == NULL)
57  {
58  ERR("Failed to create property sheet page FolderOptionsView\n");
59  return E_FAIL;
60  }
61  if (!pfnAddPage(hPage, lParam))
62  return E_FAIL;
63 
65  if (hPage == NULL)
66  {
67  ERR("Failed to create property sheet page FolderOptionsFileTypes\n");
68  return E_FAIL;
69  }
70  if (!pfnAddPage(hPage, lParam))
71  return E_FAIL;
72 
73  return S_OK;
74 }
75 
77 {
78  TRACE("(%p) (uPageID %u, pfnReplaceWith %p lParam %p\n", this, uPageID, pfnReplaceWith, lParam);
79  return E_NOTIMPL;
80 }
81 
82 /*************************************************************************
83  * FolderOptions IShellExtInit interface
84  */
85 
87 {
88  return S_OK;
89 }
90 
91 
92 /*************************************************************************
93  * FolderOptions IShellExtInit interface
94  */
96 {
97  m_pSite = pUnkSite;
98  return S_OK;
99 }
100 
102 {
103  return m_pSite->QueryInterface(riid, ppvSite);
104 }
105 
#define REFIID
Definition: guiddef.h:118
WINE_DEFAULT_DEBUG_CHANNEL(fprop)
REFIID riid
Definition: precomp.h:44
#define CALLBACK
Definition: compat.h:27
virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, void **ppvSite)
UINT_PTR WPARAM
Definition: windef.h:207
CComPtr< IUnknown > m_pSite
int32_t INT_PTR
Definition: typedefs.h:63
#define E_FAIL
Definition: ddrawi.h:102
WPARAM wParam
Definition: combotst.c:138
virtual HRESULT STDMETHODCALLTYPE AddPages(LPFNSVADDPROPSHEETPAGE pfnAddPage, LPARAM lParam)
struct _PSP * HPROPSHEETPAGE
Definition: mstask.idl:90
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
#define TRACE(s)
Definition: solgame.cpp:4
virtual HRESULT STDMETHODCALLTYPE ReplacePage(EXPPS uPageID, LPFNSVADDPROPSHEETPAGE pfnReplaceWith, LPARAM lParam)
LONG HRESULT
Definition: typedefs.h:78
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
LPARAM LPFNSVADDPROPSHEETPAGE
Definition: shobjidl.idl:117
INT_PTR CALLBACK FolderOptionsFileTypesDlg(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: filetypes.cpp:1665
#define IDD_FOLDER_OPTIONS_GENERAL
Definition: shresdef.h:350
#define IDD_FOLDER_OPTIONS_FILETYPES
Definition: shresdef.h:352
#define ERR(fmt,...)
Definition: debug.h:110
#define S_OK
Definition: intsafe.h:59
#define IDD_FOLDER_OPTIONS_VIEW
Definition: shresdef.h:351
INT_PTR CALLBACK FolderOptionsViewDlg(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: view.cpp:934
#define E_NOTIMPL
Definition: ddrawi.h:99
unsigned int UINT
Definition: ndis.h:50
HPROPSHEETPAGE SH_CreatePropertySheetPage(LPCSTR resname, DLGPROC dlgproc, LPARAM lParam, LPWSTR szTitle)
virtual HRESULT STDMETHODCALLTYPE Initialize(PCIDLIST_ABSOLUTE pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID)
INT_PTR CALLBACK FolderOptionsGeneralDlg(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: general.cpp:365
LPARAM lParam
Definition: combotst.c:139
virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *pUnkSite)