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.

120 lines
4.5 KiB

  1. #ifndef _BROWBAND_H_
  2. #define _BROWBAND_H_
  3. class CBrowserBand :
  4. public CToolBand
  5. ,public IContextMenu
  6. ,public IWinEventHandler
  7. ,public IDispatch
  8. ,public IBrowserBand
  9. ,public IPersistPropertyBag
  10. {
  11. public:
  12. // *** IUnknown ***
  13. virtual STDMETHODIMP QueryInterface(REFIID riid, LPVOID * ppvObj);
  14. STDMETHODIMP_(ULONG) AddRef(void) { return CToolBand::AddRef(); };
  15. STDMETHODIMP_(ULONG) Release(void) { return CToolBand::Release(); };
  16. // *** IServiceProvider methods ***
  17. virtual STDMETHODIMP QueryService(REFGUID guidService, REFIID riid, LPVOID* ppvObj);
  18. // *** IDockingWindow methods ***
  19. virtual STDMETHODIMP CloseDW(DWORD dwReserved);
  20. // *** IObjectWithSite methods ***
  21. virtual STDMETHODIMP SetSite(IUnknown* punkSite);
  22. // *** IInputObject methods ***
  23. virtual STDMETHODIMP TranslateAcceleratorIO(LPMSG lpMsg);
  24. virtual STDMETHODIMP UIActivateIO(BOOL fActivate, LPMSG lpMsg);
  25. // *** IOleCommandTarget methods ***
  26. virtual STDMETHODIMP QueryStatus(const GUID *pguidCmdGroup,
  27. ULONG cCmds, OLECMD rgCmds[], OLECMDTEXT *pcmdtext);
  28. virtual STDMETHODIMP Exec(const GUID *pguidCmdGroup,
  29. DWORD nCmdID, DWORD nCmdexecopt, VARIANTARG *pvarargIn, VARIANTARG *pvarargOut);
  30. // *** IDeskBand methods ***
  31. virtual STDMETHODIMP GetBandInfo(DWORD dwBandID, DWORD fViewMode,
  32. DESKBANDINFO* pdbi) ;
  33. // *** IPersistPropertyBag methods ***
  34. virtual STDMETHODIMP InitNew()
  35. { return E_NOTIMPL; };
  36. virtual STDMETHODIMP Load(IPropertyBag* pPBag, IErrorLog *pErrLog);
  37. virtual STDMETHODIMP Save(IPropertyBag *pPropBag, BOOL fClearDirty, BOOL fSaveAllProperties)
  38. { return E_NOTIMPL; };
  39. // *** IPersistStream methods ***
  40. // (others use base class implementation)
  41. virtual STDMETHODIMP GetClassID(CLSID *pClassID);
  42. virtual STDMETHODIMP Load(IStream *pStm);
  43. virtual STDMETHODIMP Save(IStream *pStm, BOOL fClearDirty);
  44. // *** IWinEventHandler methods ***
  45. virtual STDMETHODIMP OnWinEvent(HWND hwnd, UINT dwMsg, WPARAM wParam, LPARAM lParam, LRESULT *plres);
  46. virtual STDMETHODIMP IsWindowOwner(HWND hwnd);
  47. // *** IContextMenu methods ***
  48. STDMETHOD(QueryContextMenu)(HMENU hmenu,
  49. UINT indexMenu,
  50. UINT idCmdFirst,
  51. UINT idCmdLast,
  52. UINT uFlags);
  53. STDMETHOD(InvokeCommand)(LPCMINVOKECOMMANDINFO lpici);
  54. STDMETHOD(GetCommandString)(UINT_PTR idCmd,
  55. UINT uType,
  56. UINT * pwReserved,
  57. LPSTR pszName,
  58. UINT cchMax) { return E_NOTIMPL; };
  59. // *** IDispatch methods ***
  60. virtual STDMETHODIMP GetTypeInfoCount(UINT *pctinfo){return(E_NOTIMPL);}
  61. virtual STDMETHODIMP GetTypeInfo(UINT itinfo,LCID lcid,ITypeInfo **pptinfo){return(E_NOTIMPL);}
  62. virtual STDMETHODIMP GetIDsOfNames(REFIID riid,OLECHAR **rgszNames,UINT cNames, LCID lcid, DISPID * rgdispid){return(E_NOTIMPL);}
  63. virtual STDMETHODIMP Invoke(DISPID dispidMember,REFIID riid,LCID lcid,WORD wFlags,
  64. DISPPARAMS * pdispparams, VARIANT * pvarResult, EXCEPINFO * pexcepinfo,UINT * puArgErr);
  65. // *** IBrowserBand methods ***
  66. STDMETHOD(GetObjectBB)(THIS_ REFIID riid, LPVOID *ppv);
  67. STDMETHOD(SetBrowserBandInfo)(THIS_ DWORD dwMask, PBROWSERBANDINFO pbbi);
  68. STDMETHOD(GetBrowserBandInfo)(THIS_ DWORD dwMask, PBROWSERBANDINFO pbbi);
  69. protected:
  70. CBrowserBand();
  71. virtual ~CBrowserBand();
  72. friend HRESULT CBrowserBand_CreateInstance(IUnknown *punkOuter, IUnknown **ppunk, LPCOBJECTINFO poi); // for ctor
  73. friend IDeskBand* CBrowserBand_Create(LPCITEMIDLIST pidl);
  74. virtual void _Connect(BOOL fConnect);
  75. HRESULT _CreateOCHost();
  76. virtual void _InitBrowser(void);
  77. virtual HRESULT _NavigateOC();
  78. LRESULT _OnNotify(LPNMHDR pnm);
  79. SIZE _GetCurrentSize();
  80. #ifdef DEBUG
  81. void _DebugTestCode();
  82. #endif
  83. void _MakeSizesConsistent(LPSIZE psizeCur);
  84. IWebBrowser2 * _pauto;
  85. IOleInPlaceActiveObject * _poipao;
  86. LPITEMIDLIST _pidl;
  87. DWORD _dwcpCookie;
  88. WCHAR _wszTitle[40];
  89. BOOL _fBlockSIDProxy:1; // SID_SProxyBrowser
  90. BOOL _fBlockDrop:1; // should we block drop on contents
  91. BOOL _fCustomTitle:1;
  92. DWORD _dwModeFlags;
  93. SIZE _sizeMin;
  94. SIZE _sizeMax;
  95. };
  96. #endif // _BROWBAND_H_