quote:
Originally posted by Dennis Mike
how can i use this property for add direction from the dragged file to the listbox?
You can't... (afaik)
That is, you can not do it unless you also use an external DLL to subclass the listview.
In Plus! scripting, you can subclass windows, but you can not subclass controls. And you need to subclass the listview control in order to use the drag/drop facility. There is no way to work around this I'm afraid...
Therefor, why the <AcceptFiles> was included in the listview is a small riddle to me
. However, in the future I'm sure Patchou will add something to either subclass controls too or add some event which will trigger when files are dropped on a listview (which would be the best thing IMHO)...
Note: since you can subclass windows, you could drop files on a window and catch them though. For this you can use a small and very old API (is a leftover from Windows 95*). You need to tell Windows that your window can accept files. To do this you need to call the
DragAcceptFiles API. When this is done, each time you drop files on your window, a
WM_DROPFILES message will be posted from that window and you can get the dropped files using the
DragQueryFile API.
But although this works for windows, here also lies the fact that you can not use this method for a control. This because the
WM_DROPFILES message is posted from the window which accepted the files (your listview control), thus not send to its parent window... and the parent window is the only thing subclassable in Plus! scripting...
Other (more modern) methods like OLE2, also require methods not supported by Plus!. At least not that I know of..... But I actually hope I'm wrong here as I would like to use drag/dropping too.
* This was the method used in Windows 95 for setting windows to accept dropped files. Which since then better methods (OLE) were made. This also means that it is quite possible that this method will not work anymore in the future (eg: on Vista? dunno, don't have Vista atm to test it).