[BROWSEUI] Implement ACLCustomMRU.
[reactos.git] / dll / win32 / browseui / ACLCustomMRU.h
1 /*
2 * PROJECT: ReactOS browseui
3 * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4 * PURPOSE: Custom MRU AutoComplete List
5 * COPYRIGHT: Copyright 2017 Mark Jansen (mark.jansen@reactos.org)
6 */
7
8 #pragma once
9
10 class CACLCustomMRU :
11 public CComCoClass<CACLCustomMRU, &CLSID_ACLCustomMRU>,
12 public CComObjectRootEx<CComMultiThreadModelNoCS>,
13 public IACLCustomMRU
14 {
15 private:
16 CRegKey m_Key;
17 CStringW m_MRUList;
18 CSimpleArray<CStringW> m_MRUData;
19 bool m_bDirty;
20
21 void PersistMRU();
22
23 public:
24 CACLCustomMRU();
25 ~CACLCustomMRU();
26
27 // *** IACLCustomMRU methods ***
28 virtual HRESULT STDMETHODCALLTYPE Initialize(LPCWSTR pwszMRURegKey, DWORD dwMax);
29 virtual HRESULT STDMETHODCALLTYPE AddMRUString(LPCWSTR pwszEntry);
30
31 public:
32
33 DECLARE_REGISTRY_RESOURCEID(IDR_ACLCUSTOMMRU)
34 DECLARE_NOT_AGGREGATABLE(CACLCustomMRU)
35
36 DECLARE_PROTECT_FINAL_CONSTRUCT()
37
38 BEGIN_COM_MAP(CACLCustomMRU)
39 COM_INTERFACE_ENTRY_IID(IID_IACLCustomMRU, IACLCustomMRU)
40 END_COM_MAP()
41 };