Get Default Icon for File based on extension
I'm getting the file names off of a FTP server, and using the three rightmost non-null characters as the extension. i know not all extensions are three characters, but for the moment, this is irrelevant.
so im doing FTPFINDFIRSTFILE and INTERNETFINDNEXTFILE, trimming off all the Chr$(0)'s and adding the filename and extension to an array. I then filter through the array, assigning static icons to some file types (HTM, CSS, JS, etc). They are then assigned to a ListView.
But if it doesn't recognize the extension, I have it set to use the default Wordpad .DOC icon, the one that is uglier then penguin faeces.
How can I do this? I don't want to go through WIN.INI since not all icons are available. I think it would be easy enugh if the files were local and I could get a handle for 'em, but all I have to work with is an extension from a remote FTP server.