2016-04-09 21:40:32 +00:00
|
|
|
/*
|
2017-09-08 20:19:51 +00:00
|
|
|
* PROJECT: ReactOS Compatibility Layer Shell Extension
|
2019-03-17 12:31:31 +00:00
|
|
|
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
2017-09-08 20:19:51 +00:00
|
|
|
* PURPOSE: CLayerUIPropPage definition
|
2019-03-17 12:31:31 +00:00
|
|
|
* COPYRIGHT: Copyright 2015-2019 Mark Jansen (mark.jansen@reactos.org)
|
2016-04-09 21:40:32 +00:00
|
|
|
*/
|
|
|
|
|
2017-12-09 12:40:23 +00:00
|
|
|
#pragma once
|
|
|
|
|
2016-04-09 21:40:32 +00:00
|
|
|
class CLayerUIPropPage :
|
2017-10-23 15:56:57 +00:00
|
|
|
public CPropertyPageImpl<CLayerUIPropPage>,
|
2016-04-09 21:40:32 +00:00
|
|
|
public CComCoClass<CLayerUIPropPage, &CLSID_CLayerUIPropPage>,
|
|
|
|
public CComObjectRootEx<CComMultiThreadModelNoCS>,
|
|
|
|
public IShellExtInit,
|
|
|
|
public IShellPropSheetExt
|
|
|
|
{
|
|
|
|
public:
|
2019-03-17 12:31:31 +00:00
|
|
|
CSimpleArray<CString> m_CustomLayers;
|
|
|
|
|
2016-04-09 21:40:32 +00:00
|
|
|
CLayerUIPropPage();
|
|
|
|
~CLayerUIPropPage();
|
|
|
|
|
|
|
|
// IShellExtInit
|
2019-09-22 14:36:01 +00:00
|
|
|
STDMETHODIMP Initialize(PCIDLIST_ABSOLUTE pidlFolder, LPDATAOBJECT pdtobj, HKEY hkeyProgID);
|
2016-04-09 21:40:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
// IShellPropSheetExt
|
2017-10-23 15:56:57 +00:00
|
|
|
STDMETHODIMP AddPages(LPFNADDPROPSHEETPAGE pfnAddPage, LPARAM lParam)
|
|
|
|
{
|
|
|
|
HPROPSHEETPAGE hPage = Create();
|
|
|
|
if (hPage && !pfnAddPage(hPage, lParam))
|
|
|
|
DestroyPropertySheetPage(hPage);
|
|
|
|
|
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2016-04-09 21:40:32 +00:00
|
|
|
STDMETHODIMP ReplacePage(UINT, LPFNADDPROPSHEETPAGE, LPARAM)
|
|
|
|
{
|
|
|
|
return E_NOTIMPL;
|
|
|
|
}
|
|
|
|
|
2017-10-23 15:56:57 +00:00
|
|
|
VOID OnPageAddRef()
|
|
|
|
{
|
|
|
|
InterlockedIncrement(&g_ModuleRefCnt);
|
|
|
|
}
|
|
|
|
|
|
|
|
VOID OnPageRelease()
|
|
|
|
{
|
|
|
|
InterlockedDecrement(&g_ModuleRefCnt);
|
|
|
|
}
|
|
|
|
|
2016-04-09 21:40:32 +00:00
|
|
|
HRESULT InitFile(PCWSTR Filename);
|
2017-10-23 15:56:57 +00:00
|
|
|
void UpdateControls();
|
|
|
|
INT_PTR DisableControls();
|
2017-04-22 17:11:52 +00:00
|
|
|
BOOL HasChanges() const;
|
2016-04-09 21:40:32 +00:00
|
|
|
|
2017-10-23 15:56:57 +00:00
|
|
|
int OnSetActive();
|
|
|
|
int OnApply();
|
|
|
|
LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
|
|
|
|
LRESULT OnCtrlCommand(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled);
|
|
|
|
LRESULT OnEditModes(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled);
|
|
|
|
LRESULT OnClickNotify(INT uCode, LPNMHDR hdr, BOOL& bHandled);
|
2016-04-09 21:40:32 +00:00
|
|
|
|
|
|
|
protected:
|
2017-04-22 17:11:52 +00:00
|
|
|
CString m_Filename;
|
2016-04-09 21:40:32 +00:00
|
|
|
BOOL m_IsSfcProtected;
|
|
|
|
BOOL m_AllowPermLayer;
|
|
|
|
DWORD m_LayerQueryFlags;
|
|
|
|
DWORD m_RegistryOSMode, m_OSMode;
|
|
|
|
DWORD m_RegistryEnabledLayers, m_EnabledLayers;
|
2019-03-17 12:31:31 +00:00
|
|
|
CSimpleArray<CString> m_RegistryCustomLayers;
|
2016-04-09 21:40:32 +00:00
|
|
|
|
|
|
|
public:
|
2017-10-23 15:56:57 +00:00
|
|
|
enum { IDD = IDD_ACPPAGESHEET };
|
|
|
|
|
|
|
|
BEGIN_MSG_MAP(CLayerUIPropPage)
|
|
|
|
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
|
|
|
|
COMMAND_RANGE_HANDLER(IDC_CHKRUNCOMPATIBILITY, IDC_CHKDISABLEVISUALTHEMES, OnCtrlCommand)
|
|
|
|
COMMAND_ID_HANDLER(IDC_EDITCOMPATIBILITYMODES, OnEditModes)
|
|
|
|
NOTIFY_CODE_HANDLER(NM_CLICK, OnClickNotify)
|
|
|
|
NOTIFY_CODE_HANDLER(NM_RETURN, OnClickNotify)
|
|
|
|
CHAIN_MSG_MAP(CPropertyPageImpl<CLayerUIPropPage>)
|
|
|
|
END_MSG_MAP()
|
|
|
|
|
2016-04-09 21:40:32 +00:00
|
|
|
DECLARE_REGISTRY_RESOURCEID(IDR_ACPPAGE)
|
|
|
|
DECLARE_NOT_AGGREGATABLE(CLayerUIPropPage)
|
|
|
|
|
|
|
|
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
|
|
|
|
|
|
|
BEGIN_COM_MAP(CLayerUIPropPage)
|
|
|
|
COM_INTERFACE_ENTRY_IID(IID_IShellExtInit, IShellExtInit)
|
|
|
|
COM_INTERFACE_ENTRY_IID(IID_IShellPropSheetExt, IShellPropSheetExt)
|
|
|
|
END_COM_MAP()
|
|
|
|
};
|