Shell programming is always an interesting topic. Or is it just a boring or well-known subject? #SHELL32 DLL ICONS LOCATION CODE#I found it easy to follow and the examples and code provided are easy to understand and excellently coded. It was a joy to edit compared to some articals just some small things had to be changed. As you've probably noticed I had to reformat some of the code. #SHELL32 DLL ICONS LOCATION UPDATE#If someone knows the purpose of the missing icons, please feel free to write an appropriate comment, so I can update this article. The zipped demo executable is now VC6 build, so the MFC7 libraries are not needed anymore (not all of you might have installed VS.NET yet).Added VC6 workspace and project to demo application source.The demo provided with this article simply takes the constants depicted in the table above and inserts the associated icons into two listview ctrl's, one with large icons, the other with small ones. Unfortunately, I do not know currently what these icons are used for. You might have noticed that they're a several gaps in this table. The second parameter just says whether you want a small or a large icon. I've compiled a list of icons contained in shell32.dll below. The first parameter specifies, which icon you want to retrieve. To use my method, you can just call ExtractShellIcon. It's just a simple tokenizer included in the source file. You may have noticed the tokenize function called in the non-MFC version. Not customized? Then get the original icon from // shell23.dll if (!hIcon) If (RegQueryValueEx (hkeyShellIcons, szIndex, Shell icons can be customized by the registry: // HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\ // Explorer\Shell Icons // "" = "," // E.g. ico files you have to set the index to 0):Ĭopy Code HICON ExtractShellIcon ( int nIndex, following registry value changes the icon of open folders to that icon in C:\OpenFolder.ico (for. Its name is the index of the shell icon you want to change, and the value data contains the filename of the icon and its index, separated by ' ,'. You just have to add a value to the registry at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons. #SHELL32 DLL ICONS LOCATION WINDOWS#After some research, I discovered how you can change the icons used by Windows to present folders as well as some other items. Unfortunately, a few days later a co-worker annotated, that my code did not respect his customized shell icons. You can extract such icons by using ExtractIconEx. As some of you may know, this icon is contained in the shell32.dll at position 3 for a closed folder, and 4 for an open folder. The icon that is used by the Windows Explorer. Because I like consistent UI's, I decided to dispose Some time ago I had to use a folder icon in one of my projects.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |