ReactOS 0.4.15-dev-5666-gc548b97
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 virtual HRESULT STDMETHODCALLTYPE GetBandInfo(DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO* pdbi);
53
54 // *** IObjectWithSite methods ***
55 virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown* pUnkSite);
56 virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, void **ppvSite);
57
58 // *** IOleWindow methods ***
59 virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *lphwnd);
61
62 // *** IDockingWindow methods ***
64 virtual HRESULT STDMETHODCALLTYPE ResizeBorderDW(const RECT* prcBorder, IUnknown* punkToolbarSite, BOOL fReserved);
65 virtual HRESULT STDMETHODCALLTYPE ShowDW(BOOL fShow);
66
67 // *** IInputObject methods ***
70 virtual HRESULT STDMETHODCALLTYPE UIActivateIO(BOOL fActivate, LPMSG lpMsg);
71
72 // *** IPersist methods ***
73 virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pClassID);
74
75 // *** IPersistStream methods ***
78 virtual HRESULT STDMETHODCALLTYPE Save(IStream *pStm, BOOL fClearDirty);
80
81 // *** IWinEventHandler methods ***
84
85 // *** IOleCommandTarget methods ***
86 virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText);
87 virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut);
88
89 // *** IServiceProvider methods ***
91
92 // *** IDispatch methods ***
94 virtual HRESULT STDMETHODCALLTYPE GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo);
95 virtual HRESULT STDMETHODCALLTYPE GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId);
96 virtual HRESULT STDMETHODCALLTYPE Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr);
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 STDMETHODCALLTYPE
Definition: bdasup.h:9
HBITMAP fImageBitmap
Definition: brandband.h:41
virtual HRESULT STDMETHODCALLTYPE ShowDW(BOOL fShow)
Definition: brandband.cpp:241
virtual HRESULT STDMETHODCALLTYPE IsWindowOwner(HWND hWnd)
Definition: brandband.cpp:304
virtual HRESULT STDMETHODCALLTYPE GetSizeMax(ULARGE_INTEGER *pcbSize)
Definition: brandband.cpp:293
virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *lphwnd)
Definition: brandband.cpp:210
DWORD fProfferCookie
Definition: brandband.h:38
int fBitmapSize
Definition: brandband.h:42
virtual HRESULT STDMETHODCALLTYPE GetTypeInfoCount(UINT *pctinfo)
Definition: brandband.cpp:351
virtual HRESULT STDMETHODCALLTYPE GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: brandband.cpp:361
virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText)
Definition: brandband.cpp:311
virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
Definition: brandband.cpp:317
virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorIO(LPMSG lpMsg)
Definition: brandband.cpp:260
virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode)
Definition: brandband.cpp:218
LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: brandband.cpp:384
void SelectImage()
Definition: brandband.cpp:81
LRESULT OnTimer(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
Definition: brandband.cpp:449
virtual HRESULT STDMETHODCALLTYPE OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult)
Definition: brandband.cpp:298
virtual HRESULT STDMETHODCALLTYPE ResizeBorderDW(const RECT *prcBorder, IUnknown *punkToolbarSite, BOOL fReserved)
Definition: brandband.cpp:235
int fMaxFrameCount
Definition: brandband.h:40
virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject)
Definition: brandband.cpp:338
virtual HRESULT STDMETHODCALLTYPE Load(IStream *pStm)
Definition: brandband.cpp:283
virtual HRESULT STDMETHODCALLTYPE Save(IStream *pStm, BOOL fClearDirty)
Definition: brandband.cpp:288
virtual HRESULT STDMETHODCALLTYPE Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: brandband.cpp:367
virtual HRESULT STDMETHODCALLTYPE UIActivateIO(BOOL fActivate, LPMSG lpMsg)
Definition: brandband.cpp:265
CComPtr< IDockingWindowSite > fSite
Definition: brandband.h:37
virtual HRESULT STDMETHODCALLTYPE CloseDW(DWORD dwReserved)
Definition: brandband.cpp:223
void StopAnimation()
Definition: brandband.cpp:74
virtual HRESULT STDMETHODCALLTYPE GetBandInfo(DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO *pdbi)
Definition: brandband.cpp:110
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
virtual HRESULT STDMETHODCALLTYPE GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: brandband.cpp:356
virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *pUnkSite)
Definition: brandband.cpp:141
virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, void **ppvSite)
Definition: brandband.cpp:198
virtual HRESULT STDMETHODCALLTYPE HasFocusIO()
Definition: brandband.cpp:253
DWORD fAdviseCookie
Definition: brandband.h:43
int fCurrentFrame
Definition: brandband.h:39
virtual HRESULT STDMETHODCALLTYPE IsDirty()
Definition: brandband.cpp:278
virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pClassID)
Definition: brandband.cpp:270
void StartAnimation()
Definition: brandband.cpp:68
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define IDR_BRANDBAND
Definition: resource.h:96
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:542
#define COM_INTERFACE_ENTRY_IID(iid, x)
Definition: atlcom.h:562
#define DECLARE_PROTECT_FINAL_CONSTRUCT()
Definition: atlcom.h:640
#define DECLARE_NOT_AGGREGATABLE(x)
Definition: atlcom.h:612
#define DECLARE_REGISTRY_RESOURCEID(x)
Definition: atlcom.h:606
#define END_COM_MAP()
Definition: atlcom.h:553
#define MESSAGE_HANDLER(msg, func)
Definition: atlwin.h:1920
#define BEGIN_MSG_MAP(theClass)
Definition: atlwin.h:1892
#define END_MSG_MAP()
Definition: atlwin.h:1911
unsigned int ULONG
Definition: retypes.h:1
static HBITMAP
Definition: button.c:44
const IID IID_IObjectWithSite
static LPOLESTR
Definition: stg_prop.c:27
static VARIANTARG static DISPID
Definition: ordinal.c:49
_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
_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:1610
#define WM_ERASEBKGND
Definition: winuser.h:1615
#define WM_TIMER
Definition: winuser.h:1732