Is it possible to extract the associated icon from a file extension?
I have found many examples, but they all need a reference to a file (path). I want to be able to only pass the extension like "pdf" or ".pdf" and then get the associated icon from it (small, medium, large, extralarge and jumbo).
Additional information
I have some data in a database which holds information about a file. The filename and the extension are the ones I need for this problem.
In my UI I want to be able to show a listview of all the files that are in my database. I want to show this with the filename + icon of the file type.
In my UI I also have a scaler so I can make the icons grow bigger or smaller like you see in Windows Explorer (Medium icons, Large Icons, etc.). In order to do this I would like to get the associated icon which my OS uses to show the file in Windows Explorer. This icon I can use in my listview.
I have found solutions where I can get the associated icon, but they all need to have the filepath to extract the icon from. For example: using SHFILEINFO to get file icons
What I want is to be able to pass the extension instead of a filepath.