From: Tom Felker Date: 2003-07-01T09:25:07+09:00 Subject: Drag and Drop in Windows with Explorer --=-T+JD42+kFl7VYWdJPGTV Content-Type: text/plain Content-Transfer-Encoding: 7bit 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 --=-T+JD42+kFl7VYWdJPGTV Content-Disposition: attachment; filename=filedropper.rb Content-Type: text/plain; name=filedropper.rb; charset=iso-8859-1 Content-Transfer-Encoding: 7bit #!/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) end connect(SEL_DND_MOTION) do puts "\nSEL_DND_MOTION" inquireDNDTypes(FROM_DRAGNDROP).each do |t| puts getApp().getDragTypeName(t) end if offeredDNDType?(FROM_DRAGNDROP, FXWindow.urilistType) acceptDrop end end end def create super FXWindow.urilistType = getApp().registerDragType(FXWindow.urilistTypeName) show(PLACEMENT_SCREEN) end end app = FXApp.new("FileDropper", "FXRuby") FileDropper.new(app) app.create app.run --=-T+JD42+kFl7VYWdJPGTV--