- Synchronize up to trunk's revision r57864.
[reactos.git] / dll / win32 / browseui / addresseditbox.h
1 /*
2 * ReactOS Explorer
3 *
4 * Copyright 2009 Andrew Hill <ash77 at domain reactos.org>
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21 #pragma once
22
23 class CAddressEditBox :
24 public CWindowImpl<CAddressEditBox, CWindow, CControlWinTraits>,
25 public CComCoClass<CAddressEditBox, &CLSID_AddressEditBox>,
26 public CComObjectRootEx<CComMultiThreadModelNoCS>,
27 public IShellService,
28 public IAddressBand,
29 public IAddressEditBox,
30 public IWinEventHandler,
31 public IOleCommandTarget,
32 public IDispatch,
33 public IPersistStream
34 {
35 private:
36 CContainedWindow fEditWindow;
37 CContainedWindow fComboBoxExWindow;
38 public:
39 CAddressEditBox();
40 ~CAddressEditBox();
41 private:
42 public:
43 // *** IShellService methods ***
44 virtual HRESULT STDMETHODCALLTYPE SetOwner(IUnknown *);
45
46 // *** IAddressBand methods ***
47 virtual HRESULT STDMETHODCALLTYPE FileSysChange(long param8, long paramC);
48 virtual HRESULT STDMETHODCALLTYPE Refresh(long param8);
49
50 // *** IAddressEditBox methods ***
51 virtual HRESULT STDMETHODCALLTYPE Init(HWND comboboxEx, HWND editControl, long param14, IUnknown *param18);
52 virtual HRESULT STDMETHODCALLTYPE SetCurrentDir(long paramC);
53 virtual HRESULT STDMETHODCALLTYPE ParseNow(long paramC);
54 virtual HRESULT STDMETHODCALLTYPE Execute(long paramC);
55 virtual HRESULT STDMETHODCALLTYPE Save(long paramC);
56
57 // *** IWinEventHandler methods ***
58 virtual HRESULT STDMETHODCALLTYPE OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult);
59 virtual HRESULT STDMETHODCALLTYPE IsWindowOwner(HWND hWnd);
60
61 // *** IOleCommandTarget methods ***
62 virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText);
63 virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut);
64
65 // *** IDispatch methods ***
66 virtual HRESULT STDMETHODCALLTYPE GetTypeInfoCount(UINT *pctinfo);
67 virtual HRESULT STDMETHODCALLTYPE GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo);
68 virtual HRESULT STDMETHODCALLTYPE GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId);
69 virtual HRESULT STDMETHODCALLTYPE Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr);
70
71 // *** IPersist methods ***
72 virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pClassID);
73
74 // *** IPersistStream methods ***
75 virtual HRESULT STDMETHODCALLTYPE IsDirty();
76 virtual HRESULT STDMETHODCALLTYPE Load(IStream *pStm);
77 virtual HRESULT STDMETHODCALLTYPE Save(IStream *pStm, BOOL fClearDirty);
78 virtual HRESULT STDMETHODCALLTYPE GetSizeMax(ULARGE_INTEGER *pcbSize);
79
80 // message handlers
81 // LRESULT OnSetFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
82 // LRESULT OnKillFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
83
84 DECLARE_REGISTRY_RESOURCEID(IDR_ADDRESSEDITBOX)
85 DECLARE_NOT_AGGREGATABLE(CAddressEditBox)
86
87 DECLARE_PROTECT_FINAL_CONSTRUCT()
88
89 BEGIN_MSG_MAP(CAddressEditBox)
90 // MESSAGE_HANDLER(WM_NOTIFY, OnNotify)
91 // MESSAGE_HANDLER(WM_SETFOCUS, OnSetFocus)
92 // MESSAGE_HANDLER(WM_KILLFOCUS, OnKillFocus)
93 // ALT_MSG_MAP(1)
94 // MESSAGE_HANDLER(WM_SETFOCUS, OnSetFocusSaveButton)
95 // ALT_MSG_MAP(2)
96 // MESSAGE_HANDLER(WM_SETFOCUS, OnSetFocusSelectButton)
97 END_MSG_MAP()
98
99 BEGIN_COM_MAP(CAddressEditBox)
100 COM_INTERFACE_ENTRY_IID(IID_IShellService, IShellService)
101 COM_INTERFACE_ENTRY_IID(IID_IAddressBand, IAddressBand)
102 COM_INTERFACE_ENTRY_IID(IID_IAddressEditBox, IAddressEditBox)
103 COM_INTERFACE_ENTRY_IID(IID_IWinEventHandler, IWinEventHandler)
104 COM_INTERFACE_ENTRY_IID(IID_IOleCommandTarget, IOleCommandTarget)
105 COM_INTERFACE_ENTRY_IID(IID_IDispatch, IDispatch)
106 COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist)
107 COM_INTERFACE_ENTRY_IID(IID_IPersistStream, IPersistStream)
108 END_COM_MAP()
109 };