home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / mswindo / programm / misc / 4368 < prev    next >
Encoding:
Internet Message Format  |  1992-12-21  |  2.2 KB

  1. Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!cleveland.Freenet.Edu!bu254
  2. From: bu254@cleveland.Freenet.Edu (Stephen Groundwater)
  3. Newsgroups: comp.os.ms-windows.programmer.misc
  4. Subject: Re: drag & drop server
  5. Date: 19 Dec 1992 23:56:41 GMT
  6. Organization: Case Western Reserve University, Cleveland, OH (USA)
  7. Lines: 51
  8. Message-ID: <1h0crpINNdvh@usenet.INS.CWRU.Edu>
  9. References: <1gojquINNqbv@usenet.INS.CWRU.Edu> <1992Dec13.3151.2724@dosgate>
  10. Reply-To: bu254@cleveland.Freenet.Edu (Stephen Groundwater)
  11. NNTP-Posting-Host: hela.ins.cwru.edu
  12.  
  13.  
  14. In a previous article, bu254@cleveland.Freenet.Edu (Stephen Groundwater) says:
  15. [Stuff deleted]
  16. >This is the result of my dumping the hDrop memory that
  17. >comes on the WM_DROPFILES message, and my understanding of it.
  18. >The hDrop memory is a global memory object.
  19. >The drag-drop memory object consists of two parts, a header, and
  20. >a trailing bit.
  21. >The header is 8 bytes long in windows 3.1.
  22. >The trailer is however long it needs to be.
  23. >The header:
  24. >typedef struct tagDragHeader {
  25. >    UNIT wStructSize; /* Size of struct (8 bytes in this ver) */
  26. >    UINT x; /* x co-ord on window that is dropped on. (Client DC) */
  27. >    UINT y; /* y co-ord on window that is dropped on. (Client DC) */
  28. >    WORD wReserved; /* no known purpose, should be 0 */
  29. >    } DragHeader;
  30. >This is what I think the header structure is, the first three
  31. >fields I am more or less sure of, the fourth field is a mystery
  32. >to me, but in every drop I've seen it's been 0.
  33.  
  34. Correction:
  35. I have now found out what the fourth field is, thanks to hints from
  36. blakeco@Microsoft.COM. The structure should be:
  37.  
  38. typedef struct tagDRAGHEADER {
  39.   UINT wStructSize; // Same as before
  40.   UINT x; // Same as before
  41.   UINT y; // Same as before
  42.   BOOL fInClient; // True if drop is on client area,
  43.                   // false if anywhere else (title bar etc)
  44.   } DRAGHEADER;
  45.  
  46. >The trailer:
  47. >The trailer is a series of null-terminated strings that contain
  48. >the strings that DragQueryFile() will return. The number of the
  49. >strings is not in any structure, so you don't need to worry about
  50. >that.
  51. >
  52. [Stuff Deleted] 
  53. >You should GlobalAlloc a block big enough for the header, and following
  54. >file names, and use the flag GMEM_DDESHARE when allocating.
  55. >
  56. >
  57.  
  58.