Prev: Visual Studio Setup project. Vista and Xp differences
Next: Dialog Editor display slightly different than app's
From: some dude on 16 Jan 2010 12:19 How do you tell?
From: some dude on 16 Jan 2010 21:48 After spending an hour or so reading about the very complicated IDropTarget class, a very simple (and slightly imperfect) solution occurred to me. When a window initiates a file drag, it saves the data being dragged. On receiving a file drop, if the data is identical to what was dragged, it's presumed to be from the same window. Of course, this will fail if identical data is dragged from another window, but I can live with that for now.
From: some dude on 16 Jan 2010 22:27
Actually, what I'm trying to accomplish is to avoid duplicating data dropped from it's own window (which is a CListCtrl). If it's a match, I delete the existing items, then insert the pasted file list to the new location. If it's a not a match, it just pastes, as per usual, with no deletions. On 1/16/2010 7:22 PM, David Ching wrote: > "some dude" <no(a)no.com> wrote in message > news:uGIoN#xlKHA.2160(a)TK2MSFTNGP02.phx.gbl... >> After spending an hour or so reading about the very complicated >> IDropTarget class, a very simple (and slightly imperfect) solution >> occurred to me. >> >> When a window initiates a file drag, it saves the data being dragged. >> On receiving a file drop, if the data is identical to what was >> dragged, it's presumed to be from the same window. Of course, this >> will fail if identical data is dragged from another window, but I can >> live with that for now. > > Well, it would seem you would disregard data dropped onto your window > (or added by other means) if your window already contained that data, to > avoid duplicate data. In that case, the source of the drop is not > relevant. But maybe you're trying to accomplish something different. > > -- David > > |