ReactOS  0.4.14-dev-1256-g2125fec
CISFBand.h
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS shell extensions
3  * LICENSE: GPL - See COPYING in the top level directory
4  * FILE: dll/shellext/qcklnch/CISFBand.h
5  * PURPOSE: Quick Launch Toolbar (Taskbar Shell Extension)
6  * PROGRAMMERS: Shriraj Sawant a.k.a SR13 <sr.official@hotmail.com>
7  */
8 
9 #pragma once
10 
11 class CISFBand :
12  public CWindow,
13  public CComCoClass<CBandSiteMenu, &CLSID_ISFBand>,
14  public CComObjectRootEx<CComMultiThreadModelNoCS>,
15  public IObjectWithSite,
16  public IDeskBand,
17  public IPersistStream,
18  public IWinEventHandler,
19  public IOleCommandTarget,
20  public IShellFolderBand,
21  public IContextMenu
22 {
23  // Band
25  CComPtr<IUnknown> m_Site;
26 
27  // Toolbar
28  CComPtr<IShellFolder> m_pISF;
30 
31  // Menu
35 
36 public:
37 
38  CISFBand();
39  virtual ~CISFBand();
40 
41 // Personal Methods
43 
44 // IObjectWithSite
45 
46  virtual STDMETHODIMP GetSite(
47  IN REFIID riid,
48  OUT void **ppvSite
49  );
50 
51  virtual STDMETHODIMP SetSite(
52  IN IUnknown *pUnkSite
53  );
54 
55 // IDeskBand
56 
57  virtual STDMETHODIMP GetWindow(
58  OUT HWND *phwnd
59  );
60 
62  IN BOOL fEnterMode
63  );
64 
65  virtual STDMETHODIMP ShowDW(
66  IN BOOL bShow
67  );
68 
69  virtual STDMETHODIMP CloseDW(
71  );
72 
74  LPCRECT prcBorder,
75  IUnknown *punkToolbarSite,
76  BOOL fReserved
77  );
78 
79  virtual STDMETHODIMP GetBandInfo(
80  IN DWORD dwBandID,
81  IN DWORD dwViewMode,
82  IN OUT DESKBANDINFO *pdbi
83  );
84 
85 // IPersistStream
86 
87  virtual STDMETHODIMP GetClassID(
88  OUT CLSID *pClassID
89  );
90 
91  virtual STDMETHODIMP GetSizeMax(
92  OUT ULARGE_INTEGER *pcbSize
93  );
94 
95  virtual STDMETHODIMP IsDirty();
96 
97  virtual STDMETHODIMP Load(
98  IN IStream *pStm
99  );
100 
101  virtual STDMETHODIMP Save(
102  IN IStream *pStm,
103  IN BOOL fClearDirty
104  );
105 
106 // IWinEventHandler
107 
109  IN HWND hWnd
110  );
111 
112  virtual STDMETHODIMP OnWinEvent(
113  HWND hWnd,
114  UINT uMsg,
115  WPARAM wParam,
116  LPARAM lParam,
117  LRESULT *theResult
118  );
119 
120  virtual STDMETHODIMP IsWindowOwner(
121  HWND hWnd
122  );
123 
124 // IOleCommandTarget
125 
126  virtual STDMETHODIMP Exec(
127  IN const GUID *pguidCmdGroup,
128  IN DWORD nCmdID,
129  IN DWORD nCmdexecopt,
130  IN VARIANT *pvaIn,
131  IN OUT VARIANT *pvaOut
132  );
133 
134  virtual STDMETHODIMP QueryStatus(
135  IN const GUID *pguidCmdGroup,
136  IN ULONG cCmds,
137  IN OUT OLECMD prgCmds[],
138  IN OUT OLECMDTEXT *pCmdText
139  );
140 
141 // IShellFolderBand
142  virtual STDMETHODIMP GetBandInfoSFB(
144  );
145 
146  virtual STDMETHODIMP InitializeSFB(
147  IShellFolder *psf,
148  PCIDLIST_ABSOLUTE pidl
149  );
150 
153  );
154 
155 // IContextMenu
157  UINT_PTR idCmd,
158  UINT uFlags,
159  UINT *pwReserved,
160  LPSTR pszName,
161  UINT cchMax
162  );
163 
164  virtual STDMETHODIMP InvokeCommand(
166  );
167 
169  HMENU hmenu,
170  UINT indexMenu,
171  UINT idCmdFirst,
172  UINT idCmdLast,
173  UINT uFlags
174  );
175 
176 //*****************************************************************************************************
177 
181 
185  COM_INTERFACE_ENTRY_IID(IID_IDeskBand, IDeskBand)
189  COM_INTERFACE_ENTRY_IID(IID_IWinEventHandler, IWinEventHandler)
190  COM_INTERFACE_ENTRY_IID(IID_IOleCommandTarget, IOleCommandTarget)
191  COM_INTERFACE_ENTRY_IID(IID_IShellFolderBand, IShellFolderBand)
192  COM_INTERFACE_ENTRY_IID(IID_IContextMenu, IContextMenu)
193  END_COM_MAP()
194 };
195 
DBIM_BKCOLOR struct tagDESKBANDINFO DESKBANDINFO
CComPtr< IUnknown > m_Site
Definition: CISFBand.h:25
#define IN
Definition: typedefs.h:39
#define REFIID
Definition: guiddef.h:118
virtual STDMETHODIMP OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult)
Definition: CISFBand.cpp:334
static HMENU hmenu
Definition: win.c:66
#define IDR_ISFBAND
Definition: resource.h:105
virtual STDMETHODIMP Save(IN IStream *pStm, IN BOOL fClearDirty)
Definition: CISFBand.cpp:307
virtual STDMETHODIMP GetSizeMax(OUT ULARGE_INTEGER *pcbSize)
Definition: CISFBand.cpp:314
REFIID riid
Definition: precomp.h:44
virtual STDMETHODIMP Load(IN IStream *pStm)
Definition: CISFBand.cpp:299
const GUID IID_IPersist
Definition: proxy.cpp:14
HWND hWnd
Definition: settings.c:17
REFIID LPVOID * ppv
Definition: atlbase.h:39
PIDLIST_ABSOLUTE m_pidl
Definition: CISFBand.h:29
CComPtr< IShellFolder > m_pISF
Definition: CISFBand.h:28
virtual STDMETHODIMP InvokeCommand(LPCMINVOKECOMMANDINFO pici)
Definition: CISFBand.cpp:566
#define DECLARE_NOT_AGGREGATABLE(x)
Definition: atlcom.h:611
virtual STDMETHODIMP GetSite(IN REFIID riid, OUT void **ppvSite)
Definition: CISFBand.cpp:137
DWORD m_BandID
Definition: CISFBand.h:24
UINT_PTR WPARAM
Definition: windef.h:207
UINT uFlags
Definition: api.c:59
char * LPSTR
Definition: xmlstorage.h:182
virtual STDMETHODIMP QueryStatus(IN const GUID *pguidCmdGroup, IN ULONG cCmds, IN OUT OLECMD prgCmds[], IN OUT OLECMDTEXT *pCmdText)
Definition: CISFBand.cpp:424
WPARAM wParam
Definition: combotst.c:138
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:90
unsigned int BOOL
Definition: ntddk_ex.h:94
HRESULT CreateSimpleToolbar(HWND hWndParent)
Definition: CISFBand.cpp:54
virtual STDMETHODIMP ShowDW(IN BOOL bShow)
Definition: CISFBand.cpp:171
#define STDMETHODIMP
Definition: basetyps.h:43
virtual STDMETHODIMP GetWindow(OUT HWND *phwnd)
Definition: CISFBand.cpp:154
LONG_PTR LPARAM
Definition: windef.h:208
_Inout_ PERBANDINFO * pbi
Definition: winddi.h:3917
BOOL m_textFlag
Definition: CISFBand.h:32
virtual STDMETHODIMP GetBandInfoSFB(PBANDINFOSFB pbi)
Definition: CISFBand.cpp:457
#define BEGIN_COM_MAP(x)
Definition: atlcom.h:541
virtual STDMETHODIMP ResizeBorderDW(LPCRECT prcBorder, IUnknown *punkToolbarSite, BOOL fReserved)
Definition: CISFBand.cpp:202
virtual STDMETHODIMP Exec(IN const GUID *pguidCmdGroup, IN DWORD nCmdID, IN DWORD nCmdexecopt, IN VARIANT *pvaIn, IN OUT VARIANT *pvaOut)
Definition: CISFBand.cpp:431
LONG HRESULT
Definition: typedefs.h:78
#define WINAPI
Definition: msvc.h:6
const IID IID_IObjectWithSite
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
#define COM_INTERFACE_ENTRY2_IID(iid, x, x2)
Definition: atlcom.h:569
UINT cchMax
virtual STDMETHODIMP GetCommandString(UINT_PTR idCmd, UINT uFlags, UINT *pwReserved, LPSTR pszName, UINT cchMax)
Definition: CISFBand.cpp:535
const GUID IID_IPersistStream
Definition: proxy.cpp:13
virtual STDMETHODIMP SetSite(IN IUnknown *pUnkSite)
Definition: CISFBand.cpp:115
virtual STDMETHODIMP CloseDW(IN DWORD dwReserved)
Definition: CISFBand.cpp:182
virtual STDMETHODIMP QueryContextMenu(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags)
Definition: CISFBand.cpp:639
virtual STDMETHODIMP ContextSensitiveHelp(IN BOOL fEnterMode)
Definition: CISFBand.cpp:165
#define DECLARE_REGISTRY_RESOURCEID(x)
Definition: atlcom.h:605
BOOL m_QLaunch
Definition: CISFBand.h:34
virtual STDMETHODIMP IsDirty()
Definition: CISFBand.cpp:292
virtual STDMETHODIMP GetBandInfo(IN DWORD dwBandID, IN DWORD dwViewMode, IN OUT DESKBANDINFO *pdbi)
Definition: CISFBand.cpp:209
#define COM_INTERFACE_ENTRY_IID(iid, x)
Definition: atlcom.h:561
BOOL m_iconFlag
Definition: CISFBand.h:33
Definition: ttei6.cpp:27
unsigned int UINT
Definition: ndis.h:50
HRESULT WINAPI RSHELL_CISFBand_CreateInstance(REFIID riid, void **ppv)
Definition: CISFBand.cpp:670
#define DECLARE_PROTECT_FINAL_CONSTRUCT()
Definition: atlcom.h:639
#define OUT
Definition: typedefs.h:40
virtual STDMETHODIMP InitializeSFB(IShellFolder *psf, PCIDLIST_ABSOLUTE pidl)
Definition: CISFBand.cpp:470
const GUID IID_IOleWindow
unsigned int ULONG
Definition: retypes.h:1
virtual STDMETHODIMP GetClassID(OUT CLSID *pClassID)
Definition: CISFBand.cpp:285
virtual ~CISFBand()
Definition: CISFBand.cpp:37
virtual STDMETHODIMP IsWindowOwner(HWND hWnd)
Definition: CISFBand.cpp:417
#define END_COM_MAP()
Definition: atlcom.h:552
LONG_PTR LRESULT
Definition: windef.h:209
virtual STDMETHODIMP SetBandInfoSFB(PBANDINFOSFB pbi)
Definition: CISFBand.cpp:518
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
LPARAM lParam
Definition: combotst.c:139
CISFBand()
Definition: CISFBand.cpp:28
virtual STDMETHODIMP ContainsWindow(IN HWND hWnd)
Definition: CISFBand.cpp:323