Files Dropped file icons?


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…


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


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.


well that’s handy to know.

Sorry for trying to steer you wrong there, splitn101.


All good valley!, thanks heaps for the help…

Where and how do I declare it exactly? thanks.


You’d just say

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