ReactOS 0.4.16-dev-321-g63bb46a
addressband.h
Go to the documentation of this file.
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
24 public CWindowImpl<CAddressBand, CWindow, CControlWinTraits>,
25 public CComCoClass<CAddressBand, &CLSID_SH_AddressBand>,
26 public CComObjectRootEx<CComMultiThreadModelNoCS>,
27 public IDeskBand,
28 public IObjectWithSite,
29 public IInputObject,
30 public IPersistStream,
31 public IOleCommandTarget,
32 public IServiceProvider,
33 public IWinEventHandler,
34 public IAddressBand,
35 public IInputObjectSite
36{
37private:
38 CComPtr<IDockingWindowSite> fSite;
39 CComPtr<IAddressEditBox> fAddressEditBox;
46
47public:
49 virtual ~CAddressBand();
50private:
51 void FocusChange(BOOL bFocus);
52 void CreateGoButton();
53public:
54 // *** IDeskBand methods ***
55 STDMETHOD(GetBandInfo)(DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO *pdbi) override;
56
57 // *** IObjectWithSite methods ***
58 STDMETHOD(SetSite)(IUnknown *pUnkSite) override;
59 STDMETHOD(GetSite)(REFIID riid, void **ppvSite) override;
60
61 // *** IOleWindow methods ***
62 STDMETHOD(GetWindow)(HWND *lphwnd) override;
63 STDMETHOD(ContextSensitiveHelp)(BOOL fEnterMode) override;
64
65 // *** IDockingWindow methods ***
67 STDMETHOD(ResizeBorderDW)(const RECT *prcBorder, IUnknown *punkToolbarSite, BOOL fReserved) override;
68 STDMETHOD(ShowDW)(BOOL fShow) override;
69
70 // *** IOleCommandTarget methods ***
71 STDMETHOD(QueryStatus)(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText) override;
72 STDMETHOD(Exec)(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) override;
73
74 // *** IInputObject methods ***
75 STDMETHOD(UIActivateIO)(BOOL fActivate, LPMSG lpMsg) override;
76 STDMETHOD(HasFocusIO)() override;
77 STDMETHOD(TranslateAcceleratorIO)(LPMSG lpMsg) override;
78
79 // *** IWinEventHandler methods ***
80 STDMETHOD(OnWinEvent)(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult) override;
82
83 // *** IAddressBand methods ***
84 STDMETHOD(FileSysChange)(long param8, long paramC) override;
85 STDMETHOD(Refresh)(long param8) override;
86
87 // *** IServiceProvider methods ***
88 STDMETHOD(QueryService)(REFGUID guidService, REFIID riid, void **ppvObject) override;
89
90 // *** IInputObjectSite methods ***
91 STDMETHOD(OnFocusChangeIS)(IUnknown *punkObj, BOOL fSetFocus) override;
92
93 // *** IPersist methods ***
94 STDMETHOD(GetClassID)(CLSID *pClassID) override;
95
96 // *** IPersistStream methods ***
97 STDMETHOD(IsDirty)() override;
98 STDMETHOD(Load)(IStream *pStm) override;
99 STDMETHOD(Save)(IStream *pStm, BOOL fClearDirty) override;
100 STDMETHOD(GetSizeMax)(ULARGE_INTEGER *pcbSize) override;
101
102 // message handlers
103 LRESULT OnNotifyClick(WPARAM wParam, NMHDR *notifyHeader, BOOL &bHandled);
104 LRESULT OnTipText(UINT idControl, NMHDR *notifyHeader, BOOL &bHandled);
106 LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
108
116
119
121
123 COM_INTERFACE_ENTRY_IID(IID_IDeskBand, IDeskBand)
126 COM_INTERFACE_ENTRY_IID(IID_IDockingWindow, IDockingWindow)
127 COM_INTERFACE_ENTRY_IID(IID_IOleCommandTarget, IOleCommandTarget)
128 COM_INTERFACE_ENTRY_IID(IID_IInputObject, IInputObject)
129 COM_INTERFACE_ENTRY_IID(IID_IWinEventHandler, IWinEventHandler)
130 COM_INTERFACE_ENTRY_IID(IID_IAddressBand, IAddressBand)
131 COM_INTERFACE_ENTRY_IID(IID_IServiceProvider, IServiceProvider)
132 COM_INTERFACE_ENTRY_IID(IID_IInputObjectSite, IInputObjectSite)
136};
HWND hWnd
Definition: settings.c:17
#define STDMETHOD(m)
Definition: basetyps.h:62
HIMAGELIST m_himlHot
Definition: addressband.h:45
STDMETHOD() GetClassID(CLSID *pClassID) override
STDMETHOD() OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult) override
STDMETHOD() HasFocusIO() override
STDMETHOD() IsDirty() override
LRESULT OnEraseBackground(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
STDMETHOD() SetSite(IUnknown *pUnkSite) override
LRESULT OnTipText(UINT idControl, NMHDR *notifyHeader, BOOL &bHandled)
STDMETHOD() TranslateAcceleratorIO(LPMSG lpMsg) override
STDMETHOD() Save(IStream *pStm, BOOL fClearDirty) override
STDMETHOD() GetBandInfo(DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO *pdbi) override
Definition: addressband.cpp:65
CComPtr< IAddressEditBox > fAddressEditBox
Definition: addressband.h:39
STDMETHOD() ShowDW(BOOL fShow) override
STDMETHOD() IsWindowOwner(HWND hWnd) override
STDMETHOD() FileSysChange(long param8, long paramC) override
STDMETHOD() QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText) override
bool fGoButtonShown
Definition: addressband.h:43
HWND fEditControl
Definition: addressband.h:40
STDMETHOD() GetSizeMax(ULARGE_INTEGER *pcbSize) override
HWND fGoButton
Definition: addressband.h:41
LRESULT OnWindowPosChanging(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
void FocusChange(BOOL bFocus)
Definition: addressband.cpp:52
STDMETHOD() OnFocusChangeIS(IUnknown *punkObj, BOOL fSetFocus) override
LRESULT OnNotifyClick(WPARAM wParam, NMHDR *notifyHeader, BOOL &bHandled)
STDMETHOD() QueryService(REFGUID guidService, REFIID riid, void **ppvObject) override
virtual ~CAddressBand()
Definition: addressband.cpp:48
STDMETHOD() ContextSensitiveHelp(BOOL fEnterMode) override
STDMETHOD() ResizeBorderDW(const RECT *prcBorder, IUnknown *punkToolbarSite, BOOL fReserved) override
STDMETHOD() GetSite(REFIID riid, void **ppvSite) override
CComPtr< IDockingWindowSite > fSite
Definition: addressband.h:38
STDMETHOD() Load(IStream *pStm) override
STDMETHOD() Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) override
void CreateGoButton()
HWND fComboBox
Definition: addressband.h:42
STDMETHOD() UIActivateIO(BOOL fActivate, LPMSG lpMsg) override
STDMETHOD() CloseDW(DWORD dwReserved) override
HIMAGELIST m_himlNormal
Definition: addressband.h:44
STDMETHOD() GetWindow(HWND *lphwnd) override
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define IDR_ADDRESSBAND
Definition: resource.h:92
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
REFIID riid
Definition: atlbase.h:39
#define BEGIN_COM_MAP(x)
Definition: atlcom.h:581
#define COM_INTERFACE_ENTRY_IID(iid, x)
Definition: atlcom.h:601
#define DECLARE_PROTECT_FINAL_CONSTRUCT()
Definition: atlcom.h:679
#define DECLARE_NOT_AGGREGATABLE(x)
Definition: atlcom.h:651
#define DECLARE_REGISTRY_RESOURCEID(x)
Definition: atlcom.h:645
#define END_COM_MAP()
Definition: atlcom.h:592
#define MESSAGE_HANDLER(msg, func)
Definition: atlwin.h:1926
#define NOTIFY_CODE_HANDLER(cd, func)
Definition: atlwin.h:1980
#define BEGIN_MSG_MAP(theClass)
Definition: atlwin.h:1898
#define END_MSG_MAP()
Definition: atlwin.h:1917
void Refresh(void)
Definition: magnifier.c:317
const IID IID_IObjectWithSite
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:95
unsigned int UINT
Definition: ndis.h:50
const GUID IID_IOleWindow
const GUID IID_IPersist
Definition: proxy.cpp:14
const GUID IID_IPersistStream
Definition: proxy.cpp:13
#define NM_CLICK
Definition: commctrl.h:130
#define TBN_GETINFOTIP
Definition: commctrl.h:1392
#define REFIID
Definition: guiddef.h:118
Definition: scsiwmi.h:51
uint32_t ULONG
Definition: typedefs.h:59
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
Definition: wincrypt.h:6082
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
#define WM_ERASEBKGND
Definition: winuser.h:1628
#define WM_WINDOWPOSCHANGING
Definition: winuser.h:1664
#define WM_SIZE
Definition: winuser.h:1614