ReactOS  0.4.15-dev-2103-g9dff498
CAutoComplete.h
Go to the documentation of this file.
1 /*
2  * AutoComplete interfaces implementation.
3  *
4  * Copyright 2004 Maxime Bellengé <maxime.bellenge@laposte.net>
5  * Copyright 2009 Andrew Hill
6  * Copyright 2021 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21  */
22 
23 #ifndef _AUTOCOMPLETE_H_
24 #define _AUTOCOMPLETE_H_
25 
27  public CComCoClass<CAutoComplete, &CLSID_AutoComplete>,
28  public CComObjectRootEx<CComMultiThreadModelNoCS>,
29  public IAutoComplete2,
30  public IAutoCompleteDropDown,
31  public IEnumString
32 {
33 private:
40  LPWSTR m_txtbackup; // HeapAlloc'ed
41  LPWSTR m_quickComplete; // HeapAlloc'ed
42  CComPtr<IEnumString> m_enumstr;
44 public:
45 
46  CAutoComplete();
48 
51 
52  void CreateListbox();
53 
54  // IAutoComplete2
55  virtual HRESULT WINAPI Enable(BOOL fEnable);
56  virtual HRESULT WINAPI Init(HWND hwndEdit, IUnknown *punkACL, LPCOLESTR pwzsRegKeyPath, LPCOLESTR pwszQuickComplete);
57  virtual HRESULT WINAPI GetOptions(DWORD *pdwFlag);
58  virtual HRESULT WINAPI SetOptions(DWORD dwFlag);
59 
60  // IAutoCompleteDropDown
61  virtual HRESULT STDMETHODCALLTYPE GetDropDownStatus(DWORD *pdwFlags, LPWSTR *ppwszString);
63 
64  // IEnumString methods
65  virtual HRESULT STDMETHODCALLTYPE Next(ULONG celt, LPOLESTR *rgelt, ULONG *pceltFetched);
66  virtual HRESULT STDMETHODCALLTYPE Skip(ULONG celt);
68  virtual HRESULT STDMETHODCALLTYPE Clone(IEnumString **ppenum);
69 
72 
74 
76  COM_INTERFACE_ENTRY_IID(IID_IAutoComplete, IAutoComplete)
77  COM_INTERFACE_ENTRY_IID(IID_IAutoComplete2, IAutoComplete2)
78  COM_INTERFACE_ENTRY_IID(IID_IAutoCompleteDropDown, IAutoCompleteDropDown)
81 };
82 
83 #endif /* _AUTOCOMPLETE_H_ */
static LRESULT APIENTRY ACEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
virtual HRESULT STDMETHODCALLTYPE Reset()
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
virtual HRESULT WINAPI Init(HWND hwndEdit, IUnknown *punkACL, LPCOLESTR pwzsRegKeyPath, LPCOLESTR pwszQuickComplete)
const GUID IID_IEnumString
virtual HRESULT STDMETHODCALLTYPE GetDropDownStatus(DWORD *pdwFlags, LPWSTR *ppwszString)
AUTOCOMPLETEOPTIONS m_options
Definition: CAutoComplete.h:43
#define DECLARE_NOT_AGGREGATABLE(x)
Definition: atlcom.h:611
UINT_PTR WPARAM
Definition: windef.h:207
static LRESULT APIENTRY ACLBoxSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
static LPOLESTR
Definition: stg_prop.c:27
WPARAM wParam
Definition: combotst.c:138
WNDPROC m_wpOrigLBoxProc
Definition: CAutoComplete.h:39
virtual HRESULT STDMETHODCALLTYPE ResetEnumerator()
unsigned int BOOL
Definition: ntddk_ex.h:94
LONG_PTR LPARAM
Definition: windef.h:208
virtual HRESULT WINAPI GetOptions(DWORD *pdwFlag)
#define BEGIN_COM_MAP(x)
Definition: atlcom.h:541
#define IDR_AUTOCOMPLETE
Definition: resource.h:103
WNDPROC m_wpOrigEditProc
Definition: CAutoComplete.h:38
LONG HRESULT
Definition: typedefs.h:79
#define WINAPI
Definition: msvc.h:6
virtual HRESULT STDMETHODCALLTYPE Skip(ULONG celt)
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
unsigned long DWORD
Definition: ntddk_ex.h:95
#define DECLARE_REGISTRY_RESOURCEID(x)
Definition: atlcom.h:605
virtual HRESULT WINAPI Enable(BOOL fEnable)
enum IAutoComplete2::_tagAUTOCOMPLETEOPTIONS AUTOCOMPLETEOPTIONS
virtual HRESULT STDMETHODCALLTYPE Next(ULONG celt, LPOLESTR *rgelt, ULONG *pceltFetched)
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2881
HWND hwndEdit
Definition: combotst.c:65
#define COM_INTERFACE_ENTRY_IID(iid, x)
Definition: atlcom.h:561
virtual HRESULT STDMETHODCALLTYPE Clone(IEnumString **ppenum)
unsigned int UINT
Definition: ndis.h:50
#define DECLARE_PROTECT_FINAL_CONSTRUCT()
Definition: atlcom.h:639
unsigned int ULONG
Definition: retypes.h:1
LPWSTR m_quickComplete
Definition: CAutoComplete.h:41
#define END_COM_MAP()
Definition: atlcom.h:552
WCHAR * LPWSTR
Definition: xmlstorage.h:184
CComPtr< IEnumString > m_enumstr
Definition: CAutoComplete.h:42
LONG_PTR LRESULT
Definition: windef.h:209
virtual HRESULT WINAPI SetOptions(DWORD dwFlag)
LPARAM lParam
Definition: combotst.c:139
void CreateListbox()
LPWSTR m_txtbackup
Definition: CAutoComplete.h:40
#define APIENTRY
Definition: api.h:79