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.

40 lines
936 B

  1. //
  2. // DropTarget.h
  3. //
  4. #pragma once
  5. class CDropTarget : public IDropTarget
  6. {
  7. public:
  8. CDropTarget(IShellFolder *);
  9. ~CDropTarget();
  10. //IUnknown methods
  11. STDMETHOD(QueryInterface)(REFIID, LPVOID*);
  12. STDMETHOD_(ULONG, AddRef)(void);
  13. STDMETHOD_(ULONG, Release)(void);
  14. //IDropTarget methods
  15. STDMETHOD(DragEnter)(LPDATAOBJECT, DWORD, POINTL, LPDWORD);
  16. STDMETHOD(DragOver)(DWORD, POINTL, LPDWORD);
  17. STDMETHOD(DragLeave)(VOID);
  18. STDMETHOD(Drop)(LPDATAOBJECT, DWORD, POINTL, LPDWORD);
  19. private:
  20. IShellFolder *m_psfParent;
  21. ULONG m_uiRefCount;
  22. private:
  23. BOOL m_bAcceptFmt;
  24. CLIPFORMAT m_cfPrivatePidlData;
  25. CLIPFORMAT m_cfPrivateFileData;
  26. private:
  27. BOOL queryDrop(DWORD, LPDWORD);
  28. DWORD getDropEffectFromKeyState(DWORD);
  29. BOOL CanDropFile(HGLOBAL);
  30. BOOL CanDropPidl(HGLOBAL, CONFOLDENTRY& cfe);
  31. BOOL CanDropPidl(HGLOBAL);
  32. BOOL CDropTarget::doPIDLDrop(HGLOBAL hMem, BOOL bCut);
  33. };