Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
2.7 KiB

  1. #include "taskband.h"
  2. #include "tray.h"
  3. #ifdef __cplusplus
  4. class CSimpleOleWindow : public IDeskBar // public IOleWindow,
  5. {
  6. public:
  7. // *** IUnknown ***
  8. virtual STDMETHODIMP QueryInterface(REFIID riid, LPVOID * ppvObj);
  9. virtual STDMETHODIMP_(ULONG) AddRef(void);
  10. virtual STDMETHODIMP_(ULONG) Release(void);
  11. // *** IDeskBar ***
  12. STDMETHOD(OnPosRectChangeDB)(THIS_ LPRECT prc)
  13. { ASSERT(0); return E_NOTIMPL; }
  14. STDMETHOD(SetClient) (THIS_ IUnknown* punkClient)
  15. { return E_NOTIMPL; }
  16. STDMETHOD(GetClient) (THIS_ IUnknown** ppunkClient)
  17. { return E_NOTIMPL; }
  18. // *** IOleWindow methods ***
  19. virtual STDMETHODIMP GetWindow(HWND * lphwnd);
  20. virtual STDMETHODIMP ContextSensitiveHelp(BOOL fEnterMode) { return E_NOTIMPL; }
  21. CSimpleOleWindow(HWND hwnd);
  22. protected:
  23. virtual ~CSimpleOleWindow();
  24. UINT _cRef;
  25. HWND _hwnd;
  26. };
  27. class CTaskBar : public CSimpleOleWindow
  28. , public IContextMenu
  29. , public IServiceProvider
  30. , public IRestrict
  31. {
  32. public:
  33. // *** IUnknown ***
  34. virtual STDMETHODIMP QueryInterface(REFIID riid, void ** ppvObj);
  35. virtual STDMETHODIMP_(ULONG) AddRef(void) { return CSimpleOleWindow::AddRef();};
  36. virtual STDMETHODIMP_(ULONG) Release(void){ return CSimpleOleWindow::Release();};
  37. // *** IContextMenu methods ***
  38. STDMETHOD(QueryContextMenu)(HMENU hmenu,
  39. UINT indexMenu,
  40. UINT idCmdFirst,
  41. UINT idCmdLast,
  42. UINT uFlags);
  43. STDMETHOD(InvokeCommand)(LPCMINVOKECOMMANDINFO lpici);
  44. STDMETHOD(GetCommandString)(UINT_PTR idCmd,
  45. UINT uType,
  46. UINT * pwReserved,
  47. LPSTR pszName,
  48. UINT cchMax);
  49. // *** IServiceProvider methods ***
  50. virtual STDMETHODIMP QueryService(REFGUID guidService, REFIID riid, void ** ppvObj);
  51. // *** IRestrict ***
  52. virtual STDMETHODIMP IsRestricted(const GUID * pguidID, DWORD dwRestrictAction, VARIANT * pvarArgs, DWORD * pdwRestrictionResult);
  53. // *** CSimpleOleWindow - IDeskBar ***
  54. STDMETHOD(OnPosRectChangeDB)(LPRECT prc);
  55. CTaskBar();
  56. HWND _hwndRebar;
  57. protected:
  58. //virtual ~CTaskBar();
  59. BOOL _fRestrictionsInited; // Have we read in the restrictions?
  60. BOOL _fRestrictDDClose; // Restrict: Add, Close, Drag & Drop
  61. BOOL _fRestrictMove; // Restrict: Move
  62. };
  63. #endif