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 13 HRESULT RegisterComCat(); 14 HRESULT UnregisterComCat(); 15 16 // COM class for quick launch 17 class CQuickLaunchBand : 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 { 27 HWND m_hWndBro; 28 CComPtr<IUnknown> m_punkISFB; 29 30 public: 31 32 CQuickLaunchBand(); 33 virtual ~CQuickLaunchBand(); 34 35 // ATL construct 36 37 HRESULT FinalConstruct(); 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 56 virtual STDMETHODIMP ContextSensitiveHelp( 57 IN BOOL fEnterMode 58 ); 59 60 virtual STDMETHODIMP ShowDW( 61 IN BOOL bShow 62 ); 63 64 virtual STDMETHODIMP CloseDW( 65 IN DWORD dwReserved 66 ); 67 68 virtual STDMETHODIMP ResizeBorderDW( 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 103 virtual STDMETHODIMP ContainsWindow( 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 137 virtual STDMETHODIMP GetCommandString( 138 UINT_PTR idCmd, 139 UINT uFlags, 140 UINT *pwReserved, 141 LPSTR pszName, 142 UINT cchMax 143 ); 144 145 virtual STDMETHODIMP InvokeCommand( 146 LPCMINVOKECOMMANDINFO pici 147 ); 148 149 virtual STDMETHODIMP QueryContextMenu( 150 HMENU hmenu, 151 UINT indexMenu, 152 UINT idCmdFirst, 153 UINT idCmdLast, 154 UINT uFlags 155 ); 156 157 //***************************************************************************************************** 158 159 DECLARE_NOT_AGGREGATABLE(CQuickLaunchBand) 160 DECLARE_PROTECT_FINAL_CONSTRUCT() 161 162 BEGIN_COM_MAP(CQuickLaunchBand) 163 COM_INTERFACE_ENTRY2_IID(IID_IOleWindow, IOleWindow, IDeskBand) 164 COM_INTERFACE_ENTRY2_IID(IID_IDockingWindow, IDockingWindow, IDeskBand) 165 COM_INTERFACE_ENTRY_IID(IID_IDeskBand, IDeskBand) 166 COM_INTERFACE_ENTRY_IID(IID_IObjectWithSite, IObjectWithSite) 167 COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist) 168 COM_INTERFACE_ENTRY_IID(IID_IPersistStream, IPersistStream) 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 };