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.

87 lines
3.0 KiB

  1. #ifndef _DBAPP_H
  2. #define _DBAPP_H
  3. class CDeskBarApp : public CDeskBar
  4. ,public IContextMenu3
  5. {
  6. public:
  7. STDMETHOD(QueryInterface)(REFIID riid, LPVOID * ppvObj);
  8. STDMETHODIMP_(ULONG) AddRef(void) {return CDeskBar::AddRef();};
  9. STDMETHODIMP_(ULONG) Release(void) { return CDeskBar::Release();};
  10. STDMETHOD(QueryService)(REFGUID guidService,
  11. REFIID riid, void **ppvObj);
  12. // *** IInputObject methods ***
  13. virtual STDMETHODIMP TranslateAcceleratorIO(LPMSG lpMsg);
  14. // *** IPersistStreamInit methods ***
  15. virtual STDMETHODIMP GetClassID(CLSID *pClassID);
  16. virtual STDMETHODIMP IsDirty(void);
  17. virtual STDMETHODIMP Load(IStream *pStm);
  18. virtual STDMETHODIMP Save(IStream *pStm, BOOL fClearDirty);
  19. virtual STDMETHODIMP GetSizeMax(ULARGE_INTEGER *pcbSize);
  20. virtual STDMETHODIMP InitNew(void);
  21. // *** IPersistPropertyBag ***
  22. virtual HRESULT STDMETHODCALLTYPE Load(IPropertyBag *pPropBag,
  23. IErrorLog *pErrorLog);
  24. // *** IContextMenu3 methods ***
  25. STDMETHOD(QueryContextMenu)(HMENU hmenu,
  26. UINT indexMenu,
  27. UINT idCmdFirst,
  28. UINT idCmdLast,
  29. UINT uFlags);
  30. STDMETHOD(InvokeCommand)(LPCMINVOKECOMMANDINFO lpici);
  31. STDMETHOD(GetCommandString)(UINT_PTR idCmd,
  32. UINT uType,
  33. UINT * pwReserved,
  34. LPSTR pszName,
  35. UINT cchMax);
  36. STDMETHOD(HandleMenuMsg)(UINT uMsg,
  37. WPARAM wParam,
  38. LPARAM lParam);
  39. STDMETHOD(HandleMenuMsg2)(UINT uMsg,
  40. WPARAM wParam,
  41. LPARAM lParam,
  42. LRESULT* plres);
  43. // *** IOleCommandTarget methods ***
  44. virtual STDMETHODIMP Exec(const GUID *pguidCmdGroup,
  45. DWORD nCmdID, DWORD nCmdexecopt,
  46. VARIANTARG *pvarargIn, VARIANTARG *pvarargOut);
  47. protected:
  48. virtual void _SetModeSide(UINT eMode, UINT uSide, HMONITOR hMon, BOOL fNoMerge);
  49. virtual void _UpdateCaptionTitle();
  50. virtual void _NotifyModeChange(DWORD dwMode);
  51. virtual LRESULT v_WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  52. void _LeaveSide();
  53. virtual ~CDeskBarApp();
  54. void _CreateBandSiteMenu();
  55. BOOL _OnCloseBar(BOOL fConfirm); // Override dockbar's _OnCloseBar to add UI confirmation
  56. HRESULT _MergeSide(IBandSite *pdbDst);
  57. IContextMenu3* _pcm;
  58. // this class explicitely knows about CBandSite. this is the distinction between deskbar and dbapp.
  59. CBandSite* _pbs;
  60. UINT _eInitLoaded:2;
  61. int _idCmdDeskBarFirst;
  62. friend HRESULT DeskBarApp_Create(IUnknown** ppunk);
  63. };
  64. extern HRESULT DeskBarApp_Create(IUnknown** ppunk, IUnknown** ppbs);
  65. #endif // _DBAPP_H