ReactOS  0.4.13-dev-479-gec9c8fd
CQuickLaunchBand.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/CQuickLaunchBand.h
5  * PURPOSE: Quick Launch Toolbar (Taskbar Shell Extension)
6  * PROGRAMMERS: Shriraj Sawant a.k.a SR13 <sr.official@hotmail.com>
7  */
8 #pragma once
9 
10 extern const GUID CLSID_QuickLaunchBand;
11 
12 // Component category registration
15 
16 // COM class for quick launch
18  public CComCoClass<CQuickLaunchBand, &CLSID_QuickLaunchBand>,
19  public CComObjectRootEx<CComMultiThreadModelNoCS>,
20  public IObjectWithSite,
21  public IDeskBand,
22  public IPersistStream,
23  public IWinEventHandler,
24  public IOleCommandTarget,
25  public IContextMenu
26 {
28  CComPtr<IUnknown> m_punkISFB;
29 
30  public:
31 
33  virtual ~CQuickLaunchBand();
34 
35 // ATL construct
36 
38 
39 // IObjectWithSite
40 
41  virtual STDMETHODIMP GetSite(
42  IN REFIID riid,
43  OUT void **ppvSite
44  );
45 
46  virtual STDMETHODIMP SetSite(
47  IN IUnknown *pUnkSite
48  );
49 
50 // IDeskBand
51 
52  virtual STDMETHODIMP GetWindow(
53  OUT HWND *phwnd
54  );
55 
57  IN BOOL fEnterMode
58  );
59 
60  virtual STDMETHODIMP ShowDW(
61  IN BOOL bShow
62  );
63 
64  virtual STDMETHODIMP CloseDW(
66  );
67 
69  LPCRECT prcBorder,
70  IUnknown *punkToolbarSite,
71  BOOL fReserved
72  );
73 
74  virtual STDMETHODIMP GetBandInfo(
75  IN DWORD dwBandID,
76  IN DWORD dwViewMode,
77  IN OUT DESKBANDINFO *pdbi
78  );
79 
80 // IPersistStream
81 
82  virtual STDMETHODIMP GetClassID(
83  OUT CLSID *pClassID
84  );
85 
86  virtual STDMETHODIMP GetSizeMax(
87  OUT ULARGE_INTEGER *pcbSize
88  );
89 
90  virtual STDMETHODIMP IsDirty();
91 
92  virtual STDMETHODIMP Load(
93  IN IStream *pStm
94  );
95 
96  virtual STDMETHODIMP Save(
97  IN IStream *pStm,
98  IN BOOL fClearDirty
99  );
100 
101 // IWinEventHandler
102 
104  IN HWND hWnd
105  );
106 
107  virtual STDMETHODIMP OnWinEvent(
108  HWND hWnd,
109  UINT uMsg,
110  WPARAM wParam,
111  LPARAM lParam,
112  LRESULT *theResult
113  );
114 
115  virtual STDMETHODIMP IsWindowOwner(
116  HWND hWnd
117  );
118 
119 // IOleCommandTarget
120 
121  virtual STDMETHODIMP Exec(
122  IN const GUID *pguidCmdGroup,
123  IN DWORD nCmdID,
124  IN DWORD nCmdexecopt,
125  IN VARIANT *pvaIn,
126  IN OUT VARIANT *pvaOut
127  );
128 
129  virtual STDMETHODIMP QueryStatus(
130  IN const GUID *pguidCmdGroup,
131  IN ULONG cCmds,
132  IN OUT OLECMD prgCmds[],
133  IN OUT OLECMDTEXT *pCmdText
134  );
135 
136 // IContextMenu
138  UINT_PTR idCmd,
139  UINT uFlags,
140  UINT *pwReserved,
141  LPSTR pszName,
142  UINT cchMax
143  );
144 
145  virtual STDMETHODIMP InvokeCommand(
147  );
148 
150  HMENU hmenu,
151  UINT indexMenu,
152  UINT idCmdFirst,
153  UINT idCmdLast,
154  UINT uFlags
155  );
156 
157 //*****************************************************************************************************
158 
161 
165  COM_INTERFACE_ENTRY_IID(IID_IDeskBand, IDeskBand)
169  COM_INTERFACE_ENTRY_IID(IID_IWinEventHandler, IWinEventHandler)
170  COM_INTERFACE_ENTRY_IID(IID_IOleCommandTarget, IOleCommandTarget)
171  COM_INTERFACE_ENTRY_IID(IID_IContextMenu, IContextMenu)
172  END_COM_MAP()
173 };
DBIM_BKCOLOR struct tagDESKBANDINFO DESKBANDINFO
virtual STDMETHODIMP ShowDW(IN BOOL bShow)
virtual STDMETHODIMP InvokeCommand(LPCMINVOKECOMMANDINFO pici)
#define IN
Definition: typedefs.h:38
#define REFIID
Definition: guiddef.h:113
static HMENU hmenu
Definition: win.c:66
CComPtr< IUnknown > m_punkISFB
virtual STDMETHODIMP QueryContextMenu(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags)
REFIID riid
Definition: precomp.h:44
virtual STDMETHODIMP CloseDW(IN DWORD dwReserved)
virtual STDMETHODIMP ResizeBorderDW(LPCRECT prcBorder, IUnknown *punkToolbarSite, BOOL fReserved)
HRESULT RegisterComCat()
const GUID IID_IPersist
Definition: proxy.cpp:14
HWND hWnd
Definition: settings.c:17
#define DECLARE_NOT_AGGREGATABLE(x)
Definition: atlcom.h:611
UINT_PTR WPARAM
Definition: windef.h:207
UINT uFlags
Definition: api.c:60
char * LPSTR
Definition: xmlstorage.h:182
WPARAM wParam
Definition: combotst.c:138
virtual STDMETHODIMP GetBandInfo(IN DWORD dwBandID, IN DWORD dwViewMode, IN OUT DESKBANDINFO *pdbi)
virtual STDMETHODIMP IsWindowOwner(HWND hWnd)
virtual STDMETHODIMP OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult)
_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
const GUID CLSID_QuickLaunchBand
#define STDMETHODIMP
Definition: basetyps.h:43
LONG_PTR LPARAM
Definition: windef.h:208
virtual STDMETHODIMP Load(IN IStream *pStm)
#define BEGIN_COM_MAP(x)
Definition: atlcom.h:541
virtual STDMETHODIMP GetWindow(OUT HWND *phwnd)
virtual STDMETHODIMP GetCommandString(UINT_PTR idCmd, UINT uFlags, UINT *pwReserved, LPSTR pszName, UINT cchMax)
LONG HRESULT
Definition: typedefs.h:77
virtual STDMETHODIMP SetSite(IN IUnknown *pUnkSite)
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
const GUID IID_IPersistStream
Definition: proxy.cpp:13
virtual STDMETHODIMP GetClassID(OUT CLSID *pClassID)
virtual STDMETHODIMP ContainsWindow(IN HWND hWnd)
virtual STDMETHODIMP ContextSensitiveHelp(IN BOOL fEnterMode)
#define COM_INTERFACE_ENTRY_IID(iid, x)
Definition: atlcom.h:561
virtual STDMETHODIMP GetSizeMax(OUT ULARGE_INTEGER *pcbSize)
HRESULT UnregisterComCat()
unsigned int UINT
Definition: ndis.h:50
#define DECLARE_PROTECT_FINAL_CONSTRUCT()
Definition: atlcom.h:639
virtual STDMETHODIMP QueryStatus(IN const GUID *pguidCmdGroup, IN ULONG cCmds, IN OUT OLECMD prgCmds[], IN OUT OLECMDTEXT *pCmdText)
#define OUT
Definition: typedefs.h:39
const GUID IID_IOleWindow
unsigned int ULONG
Definition: retypes.h:1
virtual STDMETHODIMP Exec(IN const GUID *pguidCmdGroup, IN DWORD nCmdID, IN DWORD nCmdexecopt, IN VARIANT *pvaIn, IN OUT VARIANT *pvaOut)
#define END_COM_MAP()
Definition: atlcom.h:552
virtual STDMETHODIMP GetSite(IN REFIID riid, OUT void **ppvSite)
LONG_PTR LRESULT
Definition: windef.h:209
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
virtual STDMETHODIMP IsDirty()
virtual STDMETHODIMP Save(IN IStream *pStm, IN BOOL fClearDirty)