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.

79 lines
3.5 KiB

  1. /*****************************************************************************\
  2. FILE: isfvcb.h
  3. DESCRIPTION:
  4. This is a base class that implements the default behavior of
  5. IShellFolderViewCallBack. This allows default DefView implementation with this
  6. callback to override specific behavior.
  7. \*****************************************************************************/
  8. #ifndef _CBASEFOLDERVIEWCB_H
  9. #define _CBASEFOLDERVIEWCB_H
  10. class CBaseFolderViewCB
  11. : public IShellFolderViewCB
  12. , public CObjectWithSite
  13. {
  14. public:
  15. //////////////////////////////////////////////////////
  16. // Public Interfaces
  17. //////////////////////////////////////////////////////
  18. // *** IUnknown ***
  19. virtual STDMETHODIMP_(ULONG) AddRef(void);
  20. virtual STDMETHODIMP_(ULONG) Release(void);
  21. virtual STDMETHODIMP QueryInterface(REFIID riid, LPVOID * ppvObj);
  22. // *** IShellFolderViewCB methods ***
  23. virtual STDMETHODIMP MessageSFVCB(UINT uMsg, WPARAM wParam, LPARAM lParam);
  24. public:
  25. // Friend Functions
  26. static HRESULT _IShellFolderViewCallBack(IShellView * psvOuter, IShellFolder * psf, HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  27. protected:
  28. // Private Member Variables
  29. int m_cRef;
  30. IUnknown * m_psfv; // Our parent's IShellFolderView. (Same as _punkSite)
  31. DWORD m_dwSignature;
  32. enum { c_dwSignature = 0x43564642 }; // "BFVC" - BaseFolderViewCb
  33. // Private Member Functions
  34. CBaseFolderViewCB();
  35. virtual ~CBaseFolderViewCB();
  36. // We have implementations for these.
  37. virtual HRESULT _OnSetISFV(IShellFolderView * psfv);
  38. // The caller needs to provide implementations for these
  39. // or they will get default behavior.
  40. virtual HRESULT _OnWindowCreated(void) {return E_NOTIMPL;};
  41. virtual HRESULT _OnDefItemCount(LPINT pi) {return E_NOTIMPL;};
  42. virtual HRESULT _OnGetHelpText(LPARAM lParam, WPARAM wParam) {return E_NOTIMPL;};
  43. virtual HRESULT _OnGetHelpTopic(SFVM_HELPTOPIC_DATA * phtd) {return E_NOTIMPL;};
  44. virtual HRESULT _OnGetZone(DWORD * pdwZone, WPARAM wParam) {return E_NOTIMPL;};
  45. virtual HRESULT _OnGetPane(DWORD dwPaneID, DWORD * pdwPane) {return E_NOTIMPL;};
  46. virtual HRESULT _OnRefresh(BOOL fReload) {return E_NOTIMPL;};
  47. virtual HRESULT _OnDidDragDrop(DROPEFFECT de, IDataObject * pdto) {return E_NOTIMPL;};
  48. virtual HRESULT _OnGetDetailsOf(UINT ici, PDETAILSINFO pdi) {return E_NOTIMPL;};
  49. virtual HRESULT _OnInvokeCommand(UINT idc) {return E_NOTIMPL;};
  50. virtual HRESULT _OnMergeMenu(LPQCMINFO pqcm) {return E_NOTIMPL;};
  51. virtual HRESULT _OnUnMergeMenu(HMENU hMenu) {return E_NOTIMPL;};
  52. virtual HRESULT _OnColumnClick(UINT ici) {return E_NOTIMPL;};
  53. virtual HRESULT _OnGetNotify(LPITEMIDLIST * ppidl, LONG * lEvents) {return E_NOTIMPL;};
  54. virtual HRESULT _OnFSNotify(LPITEMIDLIST * ppidl, LONG * lEvents) {return E_NOTIMPL;};
  55. virtual HRESULT _OnQueryFSNotify(SHChangeNotifyEntry * pshcne) {return E_NOTIMPL;};
  56. virtual HRESULT _OnSize(LONG x, LONG y) {return E_NOTIMPL;};
  57. virtual HRESULT _OnUpdateStatusBar(void) {return E_NOTIMPL;};
  58. virtual HRESULT _OnThisIDList(LPITEMIDLIST * ppidl) {return E_NOTIMPL;};
  59. virtual HRESULT _OnAddPropertyPages(SFVM_PROPPAGE_DATA * pData) {return E_NOTIMPL;};
  60. virtual HRESULT _OnInitMenuPopup(HMENU hmenu, UINT idCmdFirst, UINT nIndex) {return E_NOTIMPL;};
  61. virtual HRESULT _OnBackGroundEnumDone(void) {return E_NOTIMPL;};
  62. };
  63. #endif // _CBASEFOLDERVIEWCB_H