Source code of Windows XP (NT5)
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.

61 lines
2.0 KiB

  1. #ifndef BANDS_H_
  2. #define BANDS_H_
  3. #include "cowsite.h"
  4. // this is a virtual class!
  5. class CToolBand : public IDeskBand,
  6. public CObjectWithSite,
  7. public IPersistStream,
  8. public IInputObject
  9. {
  10. public:
  11. // *** IUnknown ***
  12. virtual STDMETHODIMP QueryInterface(REFIID riid, LPVOID * ppvObj);
  13. virtual STDMETHODIMP_(ULONG) AddRef(void);
  14. virtual STDMETHODIMP_(ULONG) Release(void);
  15. // *** IOleWindow methods ***
  16. virtual STDMETHODIMP GetWindow(HWND * lphwnd);
  17. virtual STDMETHODIMP ContextSensitiveHelp(BOOL fEnterMode) { return E_NOTIMPL; }
  18. // *** IDockingWindow methods ***
  19. virtual STDMETHODIMP ShowDW(BOOL fShow);
  20. virtual STDMETHODIMP CloseDW(DWORD dwReserved);
  21. virtual STDMETHODIMP ResizeBorderDW(LPCRECT prcBorder,
  22. IUnknown* punkToolbarSite,
  23. BOOL fReserved);
  24. // *** IObjectWithSite methods ***
  25. virtual STDMETHODIMP SetSite(IUnknown* punkSite);
  26. // *** IDeskBand methods ***
  27. virtual STDMETHODIMP GetBandInfo(DWORD dwBandID, DWORD fViewMode,
  28. DESKBANDINFO* pdbi) PURE;
  29. // *** IInputObject methods ***
  30. virtual STDMETHODIMP TranslateAcceleratorIO(LPMSG lpMsg);
  31. virtual STDMETHODIMP HasFocusIO();
  32. virtual STDMETHODIMP UIActivateIO(BOOL fActivate, LPMSG lpMsg);
  33. // *** IPersistStreamInit methods ***
  34. virtual STDMETHODIMP GetClassID(CLSID *pClassID) = 0;
  35. virtual STDMETHODIMP IsDirty(void);
  36. virtual STDMETHODIMP Load(IStream *pStm) = 0;
  37. virtual STDMETHODIMP Save(IStream *pStm, BOOL fClearDirty) = 0;
  38. virtual STDMETHODIMP GetSizeMax(ULARGE_INTEGER *pcbSize);
  39. protected:
  40. CToolBand();
  41. virtual ~CToolBand();
  42. HRESULT _BandInfoChanged();
  43. int _cRef;
  44. HWND _hwnd;
  45. HWND _hwndParent;
  46. //IUnknown* CObjectWithSite::_punkSite;
  47. BOOL _fCanFocus:1; // we accept focus (see UIActivateIO)
  48. DWORD _dwBandID;
  49. };
  50. #endif // BANDS_H_