ReactOS  0.4.15-dev-1384-g878186b
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  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20  */
21 
22 #ifndef _AUTOCOMPLETE_H_
23 #define _AUTOCOMPLETE_H_
24 
26  public CComCoClass<CAutoComplete, &CLSID_AutoComplete>,
27  public CComObjectRootEx<CComMultiThreadModelNoCS>,
28  public IAutoComplete2,
29  public IAutoCompleteDropDown,
30  public IEnumString
31 {
32 private:
41  CComPtr<IEnumString> enumstr;
43 public:
44 
45  CAutoComplete();
47 
50 
51  void CreateListbox();
52 
53  // IAutoComplete2
54  virtual HRESULT WINAPI Enable(BOOL fEnable);
55  virtual HRESULT WINAPI Init(HWND hwndEdit, IUnknown *punkACL, LPCOLESTR pwzsRegKeyPath, LPCOLESTR pwszQuickComplete);
56  virtual HRESULT WINAPI GetOptions(DWORD *pdwFlag);
57  virtual HRESULT WINAPI SetOptions(DWORD dwFlag);
58 
59  // IAutoCompleteDropDown
60  virtual HRESULT STDMETHODCALLTYPE GetDropDownStatus(DWORD *pdwFlags, LPWSTR *ppwszString);
62 
63  // IEnumString methods
64  virtual HRESULT STDMETHODCALLTYPE Next(ULONG celt, LPOLESTR *rgelt, ULONG *pceltFetched);
65  virtual HRESULT STDMETHODCALLTYPE Skip(ULONG celt);
67  virtual HRESULT STDMETHODCALLTYPE Clone(IEnumString **ppenum);
68 
71 
73 
75  COM_INTERFACE_ENTRY_IID(IID_IAutoComplete, IAutoComplete)
76  COM_INTERFACE_ENTRY_IID(IID_IAutoComplete2, IAutoComplete2)
77  COM_INTERFACE_ENTRY_IID(IID_IAutoCompleteDropDown, IAutoCompleteDropDown)
80 };
81 
82 #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)
#define DECLARE_NOT_AGGREGATABLE(x)
Definition: atlcom.h:611
UINT_PTR WPARAM
Definition: windef.h:207
WNDPROC wpOrigLBoxProc
Definition: CAutoComplete.h:38
CComPtr< IEnumString > enumstr
Definition: CAutoComplete.h:41
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
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)
WCHAR * quickComplete
Definition: CAutoComplete.h:40
#define BEGIN_COM_MAP(x)
Definition: atlcom.h:541
#define IDR_AUTOCOMPLETE
Definition: resource.h:103
__wchar_t WCHAR
Definition: xmlstorage.h:180
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
AUTOCOMPLETEOPTIONS options
Definition: CAutoComplete.h:42
#define COM_INTERFACE_ENTRY_IID(iid, x)
Definition: atlcom.h:561
virtual HRESULT STDMETHODCALLTYPE Clone(IEnumString **ppenum)
unsigned int UINT
Definition: ndis.h:50
WNDPROC wpOrigEditProc
Definition: CAutoComplete.h:37
#define DECLARE_PROTECT_FINAL_CONSTRUCT()
Definition: atlcom.h:639
WCHAR * txtbackup
Definition: CAutoComplete.h:39
unsigned int ULONG
Definition: retypes.h:1
#define END_COM_MAP()
Definition: atlcom.h:552
WCHAR * LPWSTR
Definition: xmlstorage.h:184
LONG_PTR LRESULT
Definition: windef.h:209
virtual HRESULT WINAPI SetOptions(DWORD dwFlag)
LPARAM lParam
Definition: combotst.c:139
void CreateListbox()
#define APIENTRY
Definition: api.h:79