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.

52 lines
1.2 KiB

  1. /*
  2. * dragdrop.c -
  3. *
  4. * Code for Drag/Drop API's.
  5. *
  6. * This code assumes something else does all the dragging work; it just
  7. * takes a list of files after all the extra stuff.
  8. *
  9. * The File Manager is responsible for doing the drag loop, determining
  10. * what files will be dropped, formatting the file list, and posting
  11. * the WM_DROPFILES message.
  12. *
  13. * The list of files is a sequence of zero terminated filenames, fully
  14. * qualified, ended by an empty name (double NUL). The memory is allocated
  15. * DDESHARE.
  16. */
  17. #include <windows.h>
  18. #include "shellapi.h"
  19. void WINAPI DragFinishWOW(HDROP hDrop);
  20. //
  21. // Make sure that we correctly alias wParam of WM_DROPFILES, because that's
  22. // the handle in hDrop
  23. //
  24. BOOL WINAPI DragQueryPoint(HDROP hDrop, LPPOINT lppt)
  25. {
  26. LPDROPFILESTRUCT lpdfs;
  27. BOOL fNC;
  28. lpdfs = (LPDROPFILESTRUCT)GlobalLock((HGLOBAL)hDrop);
  29. *lppt = lpdfs->pt;
  30. fNC = lpdfs->fNC;
  31. GlobalUnlock((HGLOBAL)hDrop);
  32. return !fNC;
  33. }
  34. void WINAPI DragFinish(HDROP hDrop)
  35. {
  36. GlobalFree((HGLOBAL)hDrop);
  37. // The call to 32-bit DragFinish is not needed as GlobalFree is hooked
  38. // and will allow for the release of an alias (see wow32\wshell.c)
  39. // DragFinishWOW(hDrop);
  40. }
  41.