ReactOS 0.4.15-dev-8422-g6219a1a
brandband.h
Go to the documentation of this file.
1/*
2 * ReactOS Explorer
3 *
4 * Copyright 2009 Andrew Hill <ash77@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<CBrandBand, CWindow, CControlWinTraits>,
25 public CComCoClass<CBrandBand, &CLSID_BrandBand>,
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 IDispatch
35{
36private:
37 CComPtr<IDockingWindowSite> fSite;
44public:
45 CBrandBand();
47 void StartAnimation();
48 void StopAnimation();
49 void SelectImage();
50public:
51 // *** IDeskBand methods ***
52 STDMETHOD(GetBandInfo)(DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO* pdbi) override;
53
54 // *** IObjectWithSite methods ***
55 STDMETHOD(SetSite)(IUnknown* pUnkSite) override;
56 STDMETHOD(GetSite)(REFIID riid, void **ppvSite) override;
57
58 // *** IOleWindow methods ***
59 STDMETHOD(GetWindow)(HWND *lphwnd) override;
60 STDMETHOD(ContextSensitiveHelp)(BOOL fEnterMode) override;
61
62 // *** IDockingWindow methods ***
64 STDMETHOD(ResizeBorderDW)(const RECT* prcBorder, IUnknown* punkToolbarSite, BOOL fReserved) override;
65 STDMETHOD(ShowDW)(BOOL fShow) override;
66
67 // *** IInputObject methods ***
68 STDMETHOD(HasFocusIO)() override;
69 STDMETHOD(TranslateAcceleratorIO)(LPMSG lpMsg) override;
70 STDMETHOD(UIActivateIO)(BOOL fActivate, LPMSG lpMsg) override;
71
72 // *** IPersist methods ***
73 STDMETHOD(GetClassID)(CLSID *pClassID) override;
74
75 // *** IPersistStream methods ***
76 STDMETHOD(IsDirty)() override;
77 STDMETHOD(Load)(IStream *pStm) override;
78 STDMETHOD(Save)(IStream *pStm, BOOL fClearDirty) override;
79 STDMETHOD(GetSizeMax)(ULARGE_INTEGER *pcbSize) override;
80
81 // *** IWinEventHandler methods ***
82 STDMETHOD(OnWinEvent)(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult) override;
84
85 // *** IOleCommandTarget methods ***
86 STDMETHOD(QueryStatus)(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText) override;
87 STDMETHOD(Exec)(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) override;
88
89 // *** IServiceProvider methods ***
90 STDMETHOD(QueryService)(REFGUID guidService, REFIID riid, void **ppvObject) override;
91
92 // *** IDispatch methods ***
93 STDMETHOD(GetTypeInfoCount)(UINT *pctinfo) override;
94 STDMETHOD(GetTypeInfo)(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) override;
95 STDMETHOD(GetIDsOfNames)(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) override;
96 STDMETHOD(Invoke)(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) override;
97
98 // message handlers
99 LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
101 LRESULT OnPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
102 LRESULT OnTimer(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);
103
105 // MESSAGE_HANDLER(WM_SIZE, OnSize)
110
113
115
117 COM_INTERFACE_ENTRY_IID(IID_IDeskBand, IDeskBand)
120 COM_INTERFACE_ENTRY_IID(IID_IDockingWindow, IDockingWindow)
121 COM_INTERFACE_ENTRY_IID(IID_IInputObject, IInputObject)
124 COM_INTERFACE_ENTRY_IID(IID_IWinEventHandler, IWinEventHandler)
125 COM_INTERFACE_ENTRY_IID(IID_IOleCommandTarget, IOleCommandTarget)
126 COM_INTERFACE_ENTRY_IID(IID_IServiceProvider, IServiceProvider)
129};
HWND hWnd
Definition: settings.c:17
#define STDMETHOD(m)
Definition: basetyps.h:62
HBITMAP fImageBitmap
Definition: brandband.h:41
STDMETHOD() QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText) override
Definition: brandband.cpp:311
STDMETHOD() Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) override
Definition: brandband.cpp:367
STDMETHOD() GetSizeMax(ULARGE_INTEGER *pcbSize) override
Definition: brandband.cpp:293
STDMETHOD() SetSite(IUnknown *pUnkSite) override
Definition: brandband.cpp:141
DWORD fProfferCookie
Definition: brandband.h:38
int fBitmapSize
Definition: brandband.h:42
STDMETHOD() GetWindow(HWND *lphwnd) override
Definition: brandband.cpp:210
LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: brandband.cpp:384
void SelectImage()
Definition: brandband.cpp:81
STDMETHOD() OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult) override
Definition: brandband.cpp:298
STDMETHOD() GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) override
Definition: brandband.cpp:361
LRESULT OnTimer(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: brandband.cpp:449
STDMETHOD() CloseDW(DWORD dwReserved) override
Definition: brandband.cpp:223
STDMETHOD() GetSite(REFIID riid, void **ppvSite) override
Definition: brandband.cpp:198
STDMETHOD() Save(IStream *pStm, BOOL fClearDirty) override
Definition: brandband.cpp:288
STDMETHOD() UIActivateIO(BOOL fActivate, LPMSG lpMsg) override
Definition: brandband.cpp:265
STDMETHOD() IsDirty() override
Definition: brandband.cpp:278
STDMETHOD() Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) override
Definition: brandband.cpp:317
STDMETHOD() IsWindowOwner(HWND hWnd) override
Definition: brandband.cpp:304
int fMaxFrameCount
Definition: brandband.h:40
CComPtr< IDockingWindowSite > fSite
Definition: brandband.h:37
void StopAnimation()
Definition: brandband.cpp:74
LRESULT OnPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: brandband.cpp:395
LRESULT OnEraseBkgnd(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: brandband.cpp:390
DWORD fAdviseCookie
Definition: brandband.h:43
STDMETHOD() HasFocusIO() override
Definition: brandband.cpp:253
int fCurrentFrame
Definition: brandband.h:39
STDMETHOD() ResizeBorderDW(const RECT *prcBorder, IUnknown *punkToolbarSite, BOOL fReserved) override
Definition: brandband.cpp:235
STDMETHOD() Load(IStream *pStm) override
Definition: brandband.cpp:283
STDMETHOD() QueryService(REFGUID guidService, REFIID riid, void **ppvObject) override
Definition: brandband.cpp:338
STDMETHOD() ShowDW(BOOL fShow) override
Definition: brandband.cpp:241
STDMETHOD() GetClassID(CLSID *pClassID) override
Definition: brandband.cpp:270
STDMETHOD() TranslateAcceleratorIO(LPMSG lpMsg) override
Definition: brandband.cpp:260
STDMETHOD() GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) override
Definition: brandband.cpp:356
STDMETHOD() GetTypeInfoCount(UINT *pctinfo) override
Definition: brandband.cpp:351
STDMETHOD() ContextSensitiveHelp(BOOL fEnterMode) override
Definition: brandband.cpp:218
void StartAnimation()
Definition: brandband.cpp:68
STDMETHOD() GetBandInfo(DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO *pdbi) override
Definition: brandband.cpp:110
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define IDR_BRANDBAND
Definition: resource.h:97
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
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 BEGIN_MSG_MAP(theClass)
Definition: atlwin.h:1898
#define END_MSG_MAP()
Definition: atlwin.h:1917
static HBITMAP
Definition: button.c:44
const IID IID_IObjectWithSite
static LPOLESTR
Definition: stg_prop.c:27
static VARIANTARG static DISPID
Definition: ordinal.c:52
_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_IDispatch
const GUID IID_IPersist
Definition: proxy.cpp:14
const GUID IID_IPersistStream
Definition: proxy.cpp:13
#define REFIID
Definition: guiddef.h:118
DWORD LCID
Definition: nls.h:13
Definition: scsiwmi.h:51
uint32_t ULONG
Definition: typedefs.h:59
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:531
_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_PAINT
Definition: winuser.h:1620
#define WM_ERASEBKGND
Definition: winuser.h:1625
#define WM_TIMER
Definition: winuser.h:1742