Files Dropped file icons?


#1

I’m using FilesDropped to get the names of the relevant dragged files, but was wondering how can I read the icons of files to a juce::Image. When a user drags a file/folder into my app I want to draw its icon, how? Cheers…


#2

JUCE doesn’t have anything native to handle registered icon types AFAIK.


#3

Actually, on win32 it does - it’s used by the file browser classes. Do a search through the code for “juce_createIconForFile” and you’ll see how it’s used. It isn’t public, but you can use it if you declare its prototype inside the juce namespace.


#4

well that’s handy to know.

Sorry for trying to steer you wrong there, splitn101.


#5

All good valley!, thanks heaps for the help…

Where and how do I declare it exactly? thanks.


#6

You’d just say

namespace juce { Image* juce_createIconForFile (const File& file); }