home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.ms-windows.programmer.misc
- Path: sparky!uunet!spool.mu.edu!yale.edu!jvnc.net!nuscc!twchan
- From: twchan%Solomon.Technet.sg (Chan Tur Wei)
- Subject: Qns abt drag/drop & GlobalUnlock
- Message-ID: <1992Sep11.052535.1107@nuscc.nus.sg>
- Sender: usenet@nuscc.nus.sg
- Organization: National University of Singapore
- X-Newsreader: Tin 1.1 PL5
- Date: Fri, 11 Sep 1992 05:25:35 GMT
- Lines: 35
-
-
- Dear netters,
-
- I'm posting the questions below on behalf of a friend who's having
- trouble with some Windows programming problem. Appreciate if someone
- could help!
-
- (1) Supporting "Drag" besides "Drop"
-
- An application is said to support Drag-n-Drop if it calls
- DragAcceptFiles() and then processes the WM_DROPFILES message.
- However, strictly speaking this is just the "Drop" feature. How
- can an application also support the "Drag" feature just like the
- File Manager? That is, how can an application provides files
- for the user to drag and subsequently drop into another
- application?
-
- (2) Lock and Free Memory problem
-
- When an application calls GlobalUnlock() and receives zero in
- return, it means that the lock count of the memory handle has
- reduced to zero. However, when the application immediately
- tries to free it, it receives a GP fault saying that the
- application is trying to free a locked memory object. This
- problem can be worked around by calling another GlobalUnlock()
- before GlobalFree(). Therefore, it seems that when
- GlobalUnlock() returns a zero, it does not necessarily mean that
- the lock count is already decremented to zero. Is this true?
-
- I hope someone can help my friend out here. Replies by e-mail would
- be greatly appreciated! Thanx in advance.
-
-
- -T.W.Chan-
-
-