What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » AcceptFiles listbox

AcceptFiles listbox
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: AcceptFiles listbox
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 :D. 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).

This post was edited on 03-03-2007 at 03:24 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
03-03-2007 02:07 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
AcceptFiles listbox - by Dennis Mike on 03-02-2007 at 11:18 PM
RE: AcceptFiles listbox - by CookieRevised on 03-03-2007 at 02:07 AM
RE: AcceptFiles listbox - by Dennis Mike on 03-03-2007 at 03:05 AM
RE: AcceptFiles listbox - by CookieRevised on 03-03-2007 at 03:07 AM
RE: AcceptFiles listbox - by Dennis Mike on 03-03-2007 at 03:12 AM
RE: AcceptFiles listbox - by CookieRevised on 03-03-2007 at 03:26 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On