From: Tom Felker Date: 2003-07-01T13:35:38+09:00 Subject: Re: Drag and Drop in Windows with Explorer On Mon, 2003-06-30 at 19:53, Harry Ohlsen wrote: > Hi Tom, > > Sorry, I don't have an answer to your question. I had a quick play with this some time back and didn't get anywhere. > > If you get the code to work under Windows, can you post the final version to the mailing list? > > Cheers, > > Harry O. Sure, I'll post any working code I get, but I'm a bit discouraged by my further research: According to this, on Windows, Fox does DND in it's own way, not Window's way, because OLE is too weird to be cross-platform. Unfortunately, Windows developers, and certainly Microsoft, won't jump to change their DND to work with Fox. However, while most of Windows uses OLE or COM or some other hip TLA, there's also a special API for file dropping, and this person hacked up a way to do this in C++. This can be done in plain Ruby and FXRuby, given the ability: - To call Windows functions (Yes) - To access a given FXWindow's handle (Maybe) - To intercept the WM_DROPFILES message and extract wParam (Maybe) - To work with pointers to pre-allocated buffers. (Yes) I might be able to hack this up tomorrow, if FXRuby and Fox let me get low enough access. I know it's possible in C++, but I can only hope FXRuby exports enough to intercept messages and get handles. If I were a Fox hacker, I'd say they should use this simpler API to emulate Fox's DND, by sending synthetic messages and making it look like "text/uri-list". -- Tom Felker