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.

74 lines
2.5 KiB

  1. #ifndef _BODYBAR_H
  2. #define _BODYBAR_H
  3. #include "mehost.h"
  4. // for IBodyOptions
  5. #include "ibodyopt.h"
  6. class CBodyBar :
  7. public IDockingWindow,
  8. public IObjectWithSite,
  9. public IInputObject
  10. {
  11. public:
  12. CBodyBar();
  13. virtual ~CBodyBar();
  14. // IUnknown
  15. virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID, LPVOID FAR *);
  16. virtual ULONG STDMETHODCALLTYPE AddRef();
  17. virtual ULONG STDMETHODCALLTYPE Release();
  18. // IOleWindow methods
  19. virtual STDMETHODIMP GetWindow(HWND *phwnd);
  20. virtual STDMETHODIMP ContextSensitiveHelp(BOOL fEnterMode);
  21. // IDockingWindow
  22. virtual STDMETHODIMP ShowDW(BOOL fShow);
  23. virtual STDMETHODIMP CloseDW(DWORD dwReserved);
  24. virtual STDMETHODIMP ResizeBorderDW(LPCRECT prcBorder,
  25. IUnknown* punkToolbarSite,
  26. BOOL fReserved);
  27. // IObjectWithSite
  28. virtual STDMETHODIMP SetSite(IUnknown* punkSite);
  29. virtual STDMETHODIMP GetSite(REFIID riid, LPVOID * ppvSite);
  30. // IInputObject
  31. virtual STDMETHODIMP UIActivateIO(BOOL fActivate, LPMSG lpMsg);
  32. virtual STDMETHODIMP HasFocusIO();
  33. virtual STDMETHODIMP TranslateAcceleratorIO(LPMSG lpmsg);
  34. // overrides of CBody
  35. virtual HRESULT STDMETHODCALLTYPE OnUIActivate();
  36. virtual HRESULT STDMETHODCALLTYPE GetDropTarget(IDropTarget * pDropTarget, IDropTarget ** ppDropTarget);
  37. HRESULT HrInit(LPBOOL pfShow);
  38. int GetBodyBar_Top() { return( (int) HIWORD(m_dwBodyBarPos));}
  39. int GetBodyBar_Bottom() { return( (int) LOWORD(m_dwBodyBarPos));}
  40. protected:
  41. LRESULT BodyBarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
  42. static LRESULT CALLBACK ExtBodyBarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
  43. BOOL OnCreate(HWND hwnd, LPCREATESTRUCT lpCreateStruct);
  44. void OnSize(HWND hwnd, UINT state, int cxClient, int cyClient);
  45. void OnLButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags);
  46. void OnMouseMove(HWND hwnd, int x, int y, UINT keyFlags);
  47. void OnLButtonUp(HWND hwnd, int x, int y, UINT keyFlags);
  48. private:
  49. IDockingWindowSite *m_ptbSite;
  50. HWND m_hwnd;
  51. HWND m_hwndParent;
  52. int m_cSize;
  53. DWORD m_dwBodyBarPos;
  54. LPTSTR m_pszURL;
  55. BOOL m_fFirstPos;
  56. BOOL m_fDragging;
  57. CMimeEditDocHost *m_pMehost;
  58. ULONG m_cRef;
  59. };
  60. #endif // _BODYBAR_H