Drag and Drop in Windows with Explorer
Tom Felker <tcfelker <at> mtco.com>
2003-07-01 00:25:07 GMT
I need to make a Windows program with RXRuby that batch processes audio
files, after the user drags them from Explorer to the program's window.
This works easily in Linux, I just accept "text/uri-list". I was trying
to find the Windows equivalent, so I wrote some code to list the offered
types, which also works great in Linux. But in Windows (I tried XP and
98SE), when dragging files from Explorer, I don't even get a
SEL_DND_MOTION. My code is attached.
Is it possible to get dropped files in Windows, and if so, how?
Thanks,
--
--
Tom Felker <tcfelker <at> mtco.com>
#!/usr/bin/env ruby
require "fox"
include Fox
class FileDropper < FXMainWindow
def initialize(app)
super(app, "FileDropper", nil, nil, DECOR_ALL, 0, 0, 200, 150)
dropEnable
connect(SEL_DND_DROP) do
puts "\nSEL_DND_DROP"
puts getDNDData(FROM_DRAGNDROP, FXWindow.urilistType)
(Continue reading)