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.

66 lines
2.2 KiB

  1. /**************************************************************************
  2. THIS CODE AND INFORMATION IS PROVIDED 'AS IS' WITHOUT WARRANTY OF
  3. ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
  4. THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  5. PARTICULAR PURPOSE.
  6. Copyright 1998 Microsoft Corporation. All Rights Reserved.
  7. **************************************************************************/
  8. /**************************************************************************
  9. File: DropTgt.h
  10. Description: CDropTarget definitions.
  11. **************************************************************************/
  12. /**************************************************************************
  13. #include statements
  14. **************************************************************************/
  15. #include <windows.h>
  16. #include <ole2.h>
  17. #include <shlobj.h>
  18. #include "ShlFldr.h"
  19. #include "PidlMgr.h"
  20. /**************************************************************************
  21. global variables and definitions
  22. **************************************************************************/
  23. /**************************************************************************
  24. class definitions
  25. **************************************************************************/
  26. class FAR CDropTarget : public IDropTarget
  27. {
  28. public:
  29. CDropTarget(CShellFolder*);
  30. ~CDropTarget();
  31. //IUnknown methods
  32. STDMETHOD(QueryInterface)(REFIID, LPVOID*);
  33. STDMETHOD_(ULONG, AddRef)(void);
  34. STDMETHOD_(ULONG, Release)(void);
  35. //IDropTarget methods
  36. STDMETHOD(DragEnter)(LPDATAOBJECT, DWORD, POINTL, LPDWORD);
  37. STDMETHOD(DragOver)(DWORD, POINTL, LPDWORD);
  38. STDMETHOD(DragLeave)(VOID);
  39. STDMETHOD(Drop)(LPDATAOBJECT, DWORD, POINTL, LPDWORD);
  40. private:
  41. CShellFolder *m_psfParent;
  42. CPidlMgr *m_pPidlMgr;
  43. IMalloc *m_pMalloc;
  44. ULONG m_ObjRefCount;
  45. BOOL m_fAcceptFmt;
  46. UINT m_cfPrivateData;
  47. BOOL QueryDrop(DWORD, LPDWORD);
  48. DWORD GetDropEffectFromKeyState(DWORD);
  49. BOOL DoDrop(HGLOBAL, BOOL);
  50. LPITEMIDLIST* AllocPidlTable(DWORD);
  51. VOID FreePidlTable(LPITEMIDLIST*);
  52. };