home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.ms-windows.programmer.misc
- Path: sparky!uunet!gatech!destroyer!cs.ubc.ca!alberta!kakwa.ucs.ualberta.ca!ee.ualberta.ca!manz
- From: manz@ee.ualberta.ca (Brett {Druid Queen} Manz)
- Subject: Re: drag & drop server
- Message-ID: <manz.724974780@ee.ualberta.ca>
- Sender: news@kakwa.ucs.ualberta.ca
- Nntp-Posting-Host: eigen.ee.ualberta.ca
- Organization: University Of Alberta, Edmonton Canada
- References: <1gojquINNqbv@usenet.INS.CWRU.Edu> <1992Dec13.3151.2724@dosgate> <1h0crpINNdvh@usenet.INS.CWRU.Edu>
- Date: Mon, 21 Dec 1992 21:53:00 GMT
- Lines: 63
-
- In <1h0crpINNdvh@usenet.INS.CWRU.Edu> bu254@cleveland.Freenet.Edu (Stephen Groundwater) writes:
-
-
- >In a previous article, bu254@cleveland.Freenet.Edu (Stephen Groundwater) says:
- >[Stuff deleted]
- >>This is the result of my dumping the hDrop memory that
- >>comes on the WM_DROPFILES message, and my understanding of it.
- >>
- >>The hDrop memory is a global memory object.
- >>The drag-drop memory object consists of two parts, a header, and
- >>a trailing bit.
- >>The header is 8 bytes long in windows 3.1.
- >>The trailer is however long it needs to be.
- >>
- >>The header:
- >>
- >>typedef struct tagDragHeader {
- >> UNIT wStructSize; /* Size of struct (8 bytes in this ver) */
- >> UINT x; /* x co-ord on window that is dropped on. (Client DC) */
- >> UINT y; /* y co-ord on window that is dropped on. (Client DC) */
- >> WORD wReserved; /* no known purpose, should be 0 */
- >> } DragHeader;
- >>
- >>This is what I think the header structure is, the first three
- >>fields I am more or less sure of, the fourth field is a mystery
- >>to me, but in every drop I've seen it's been 0.
- >>
-
- >Correction:
- >I have now found out what the fourth field is, thanks to hints from
- >blakeco@Microsoft.COM. The structure should be:
-
- >typedef struct tagDRAGHEADER {
- > UINT wStructSize; // Same as before
- > UINT x; // Same as before
- > UINT y; // Same as before
- > BOOL fInClient; // True if drop is on client area,
- > // false if anywhere else (title bar etc)
- > } DRAGHEADER;
-
- >>The trailer:
- >>
- >>The trailer is a series of null-terminated strings that contain
- >>the strings that DragQueryFile() will return. The number of the
- >>strings is not in any structure, so you don't need to worry about
- >>that.
-
- Actually, I believe the trailer is a null-terminated list of
- null-terminated strings. ie:
-
- filename1\0filename2\0filename3\0\0
-
- Without the last null DragQueryFile() won't know where the list ends
- and will likely cause a protection error.
-
-
- >>You should GlobalAlloc a block big enough for the header, and following
- >>file names, and use the flag GMEM_DDESHARE when allocating.
- --
- ---------------------------------+-------------------------------------
- My opinions are my own. | You can't be proud of who you are
- The truth belongs to everyone. | if you're ashamed of what you are.
- I can't even *think straight! | Cruise Men, Not Missiles! - anon
-