In .Net (C# or VB: don't care), given a file path string, FileInfo struct, or FileSystemInfo struct for a real existing file, how can I determine the icon(s) used by the shell (explorer) for that file?
I'm not currently planning to use this for anything, but I became curious about how to do it when looking at this question and I thought...
I tied SHGetFileInfo and ExtractIconEx, both return a normal 32x32 icon and 16x16 with only 16 colors, and it looks awful. How do I extract a full color icon?
My code
SHFILEINFO shinfo = new SHFILEINFO();
IntPtr hImgSmall = SHGetFileInfo(fileName, 0, ref shinfo, (uint)Marshal.SizeOf(shinfo), SHGFI_ICON | SHGFI_SMALLICON);
Icon icon = ...
This is what I did:
LPMALLOC malloc;
LPITEMIDLIST pidl;
SHFILEINFO FileInfo;
SFGAOF sfGao;
if (SUCCEEDED(SHGetMalloc(&malloc))
{
if (SUCCEEDED(SHParseDisplayName(strDirPath, NULL, &pidl, SFGAO_FOLDER, &sfGao)))
{
SHGetFileInfo((LPCWSTR)(PCHAR(pidl)), 0, &FileInfo, sizeof(FileInfo), SHGFI_PIDL | SHGFI_ICON);
CDC*...
I've read http://stackoverflow.com/questions/462270/get-file-icon-used-by-shell and the other similar posts - and already use SHFileInfo to get the associated icon for any given extension, and that works great.
However, Outlook uses ".msg" for mail and appointment items (if you drag an email and drag an event onto your desktop, the resu...
Please help me how can I display the icon overlays without restarting the explorer.exe?
The problem Im in stuck here is the fact that I must always close the explorer.exe in taskbarmanager and re-open it. I want the way no need to restart shell like that. Any way in C++ ?
...
Ok, im developing some software which requires file icons to display lists of files on a computer...
i don't want to use the system ExtractAssociatedIcon api's i'd rather load the icons for the file extensions out of a database... (as some systems may not have certain files associated etc)...
Does anyone have a database of file extensi...
As far as I can tell, there have been (at least?) three types of icon embedding. There's the original style used by shell32.dll and friends, .Net's embedding, and the new type that WPF uses. I'm looking for how to perform the first one, as I want to have a few other icons available as resources for a jumplist, which can only accept that ...
I'm creating a tree of folders and files in java. Windows and OSX return the system icons and name with the following code:
new JFileChooser().getIcon(File f);
new JFileChooser().getName(File f);
Is there any possibility to get the icons and name of unix systems?. A system command would be ok too.
Thanks.
...
I really liked the oxygen appearance of KDE SC 4. I wrote a program to apply these icons to windows. The program is written in NSIS, and is currently nearly fully functional. However, the only way I found to make Windows aware of the icon changes is to kill explorer.exe, delete the icon cache, and respawn explorer.exe. SHChangeNotify wit...