I’m using 1.51 and have a content component derived from FileDragAndDropTarget.
I’m overriding isInterestedInFileDrag() and filesDropped() and on windows XP (and Mac) it works fine as expected. On windows7 when I drag a file from the desktop over the component the cursor becomes a ‘no entry’ cursor and neither the isInterestedInFileDrag() nor filesDropped() functions are called.
Does windows7 do some pre-filtering of drag-drop? if so, does anyone know how to specify what files windows7 should allow to be dropped on my app?
If not, is there a workaround/fix for this??!
I’ve just investigated a bit further… the problem lies with the fact that our app runs with administrator privileges.
The Juce demo and our component work fine with file drag-drop in windows7 if NOT run with administrator privileges, but the app needs to run as admin because it’s a download manager/installer type app.
You can recreate the problem with the juce demo by right clicking and ‘Run as administrator’.
Does anyone know how to get a juce app (or any app for that matter) running as administrator to accept files dropped on it?
I guess we need to have
ChangeWindowMessageFilter (WM_DROPFILES, MSGFLT_ADD);
ChangeWindowMessageFilter (WM_COPYDATA, MSGFLT_ADD);
ChangeWindowMessageFilter (0x0049, MSGFLT_ADD);
in void MessageManager::doPlatformSpecificInitialisation() ?