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 STDMETHOD(ContainsWindow)(IN HWND hWnd); 36 37 // ATL construct 38 39 HRESULT FinalConstruct(); 40 41 // IObjectWithSite 42 43 STDMETHOD(GetSite)( 44 IN REFIID riid, 45 OUT void **ppvSite) override; 46 47 STDMETHOD(SetSite)(IN IUnknown *pUnkSite) override; 48 49 // IDeskBand 50 51 STDMETHOD(GetWindow)(OUT HWND *phwnd) override; 52 53 STDMETHOD(ContextSensitiveHelp)(IN BOOL fEnterMode) override; 54 55 STDMETHOD(ShowDW)(IN BOOL bShow) override; 56 57 STDMETHOD(CloseDW)(IN DWORD dwReserved) override; 58 59 STDMETHOD(ResizeBorderDW)( 60 LPCRECT prcBorder, 61 IUnknown *punkToolbarSite, 62 BOOL fReserved) override; 63 64 STDMETHOD(GetBandInfo)( 65 IN DWORD dwBandID, 66 IN DWORD dwViewMode, 67 IN OUT DESKBANDINFO *pdbi) override; 68 69 // IPersistStream 70 71 STDMETHOD(GetClassID)(OUT CLSID *pClassID) override; 72 73 STDMETHOD(GetSizeMax)(OUT ULARGE_INTEGER *pcbSize) override; 74 75 STDMETHOD(IsDirty)() override; 76 77 STDMETHOD(Load)(IN IStream *pStm) override; 78 79 STDMETHOD(Save)( 80 IN IStream *pStm, 81 IN BOOL fClearDirty) override; 82 83 // IWinEventHandler 84 85 STDMETHOD(OnWinEvent)( 86 HWND hWnd, 87 UINT uMsg, 88 WPARAM wParam, 89 LPARAM lParam, 90 LRESULT *theResult) override; 91 92 STDMETHOD(IsWindowOwner)(HWND hWnd) override; 93 94 // IOleCommandTarget 95 96 STDMETHOD(Exec)( 97 IN const GUID *pguidCmdGroup, 98 IN DWORD nCmdID, 99 IN DWORD nCmdexecopt, 100 IN VARIANT *pvaIn, 101 IN OUT VARIANT *pvaOut) override; 102 103 STDMETHOD(QueryStatus)( 104 IN const GUID *pguidCmdGroup, 105 IN ULONG cCmds, 106 IN OUT OLECMD prgCmds[], 107 IN OUT OLECMDTEXT *pCmdText) override; 108 109 // IContextMenu 110 STDMETHOD(GetCommandString)( 111 UINT_PTR idCmd, 112 UINT uFlags, 113 UINT *pwReserved, 114 LPSTR pszName, 115 UINT cchMax) override; 116 117 STDMETHOD(InvokeCommand)(LPCMINVOKECOMMANDINFO pici) override; 118 119 STDMETHOD(QueryContextMenu)( 120 HMENU hmenu, 121 UINT indexMenu, 122 UINT idCmdFirst, 123 UINT idCmdLast, 124 UINT uFlags) override; 125 126 //***************************************************************************************************** 127 128 DECLARE_NOT_AGGREGATABLE(CQuickLaunchBand) 129 DECLARE_PROTECT_FINAL_CONSTRUCT() 130 131 BEGIN_COM_MAP(CQuickLaunchBand) 132 COM_INTERFACE_ENTRY2_IID(IID_IOleWindow, IOleWindow, IDeskBand) 133 COM_INTERFACE_ENTRY2_IID(IID_IDockingWindow, IDockingWindow, IDeskBand) 134 COM_INTERFACE_ENTRY_IID(IID_IDeskBand, IDeskBand) 135 COM_INTERFACE_ENTRY_IID(IID_IObjectWithSite, IObjectWithSite) 136 COM_INTERFACE_ENTRY_IID(IID_IPersist, IPersist) 137 COM_INTERFACE_ENTRY_IID(IID_IPersistStream, IPersistStream) 138 COM_INTERFACE_ENTRY_IID(IID_IWinEventHandler, IWinEventHandler) 139 COM_INTERFACE_ENTRY_IID(IID_IOleCommandTarget, IOleCommandTarget) 140 COM_INTERFACE_ENTRY_IID(IID_IContextMenu, IContextMenu) 141 END_COM_MAP() 142 }; 143