[PRINTING]
[reactos.git] / reactos / dll / shellext / acppage / CLayerUIPropPage.hpp
1 /*
2 * Copyright 2015 Mark Jansen
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19
20 class CLayerUIPropPage :
21 public CComCoClass<CLayerUIPropPage, &CLSID_CLayerUIPropPage>,
22 public CComObjectRootEx<CComMultiThreadModelNoCS>,
23 public IShellExtInit,
24 public IShellPropSheetExt
25 {
26 public:
27 CLayerUIPropPage();
28 ~CLayerUIPropPage();
29
30 // IShellExtInit
31 STDMETHODIMP Initialize(LPCITEMIDLIST pidlFolder, LPDATAOBJECT pdtobj, HKEY hkeyProgID);
32
33
34 // IShellPropSheetExt
35 STDMETHODIMP AddPages(LPFNADDPROPSHEETPAGE pfnAddPage, LPARAM lParam);
36 STDMETHODIMP ReplacePage(UINT, LPFNADDPROPSHEETPAGE, LPARAM)
37 {
38 return E_NOTIMPL;
39 }
40
41 HRESULT InitFile(PCWSTR Filename);
42 INT_PTR InitDialog(HWND hWnd);
43 INT_PTR OnCommand(HWND hWnd, WORD id);
44 void UpdateControls(HWND hWnd);
45 INT_PTR DisableControls(HWND hWnd);
46
47 void OnRefresh(HWND hWnd);
48 void OnApply(HWND hWnd);
49
50 static INT_PTR CALLBACK PropDlgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
51 /*static INT_PTR CALLBACK EditModesProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);*/
52
53
54 protected:
55 CComBSTR m_Filename;
56 BOOL m_IsSfcProtected;
57 BOOL m_AllowPermLayer;
58 DWORD m_LayerQueryFlags;
59 DWORD m_RegistryOSMode, m_OSMode;
60 DWORD m_RegistryEnabledLayers, m_EnabledLayers;
61
62 public:
63 DECLARE_REGISTRY_RESOURCEID(IDR_ACPPAGE)
64 DECLARE_NOT_AGGREGATABLE(CLayerUIPropPage)
65
66 DECLARE_PROTECT_FINAL_CONSTRUCT()
67
68 BEGIN_COM_MAP(CLayerUIPropPage)
69 COM_INTERFACE_ENTRY_IID(IID_IShellExtInit, IShellExtInit)
70 COM_INTERFACE_ENTRY_IID(IID_IShellPropSheetExt, IShellPropSheetExt)
71 END_COM_MAP()
72 };