News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Icon library

Started by Magnum, February 05, 2013, 12:30:39 PM

Previous topic - Next topic

Magnum

I did a search here and at the "old ranch" for some code snippets.

I would like to make an icon library.

I used IconShop but it makes an .icl file.

I read where it's risky adding icons to shell32.dll.

Can I make my own icon .dll that would pop up whenever I wanted to change an icon for a program?

There is no "Change icon" option anymore for files, but Ehow showed a way where you send it to the desktop and change the icon from there.

Thanks.
Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

hutch--

Andy,

I would make a backup of the shell32.dll first then try changing them one at a time taking care of the icon size and colour depth. There are a number of resource editors around that will do this and its generally the technique used with custom interface variations for Windows XP. I simply don't know if you can still do this on Vista, Win7 or Win8.

dedndave

don't know if you can alter shell32.dll - hopefully not

but, you can create a dll with resources in it

Magnum

Hutch,

I am still trying to fix why my icon association is not working right.

I decided to delete user32.dll sp3 version and use an older version.

I used linux to do it.

Then I put an older copy into the system32 directory.

No change in the problem.

Then I thought, maybe my user profile is corrupt.

Made a new one and again no change.

I had iview set to open jpegs, but some icon from user32.dll was displayed for the jpeg files in explorer.

I decided to uninstall iview to see what would happen.

No change, but now when I try to install iview, all it does is beep.

I am ready to call a voodoo doctor.

Andy


Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

Tedd

You worry me - you make all of these crazy system changes and then wonder where your problems come from ::)

Anyway, you can make a single dll that contains multiple icon resources and then set a DefaultIcon key for the specific file type with the value as "C:\full\path\to\mycrazyicons.dll",3 where the number is the icon index.

Or, you can set it like you're supposed to:
1. Open a folder window (e.g. My Computer)
2. Tools -> Folder Options...
3. Select the "File Types" tab
4. Choose a file type, or create a new one
5. Press the "Advanced" button at the bottom of the dialog
6. Press the "Change Icon..." button, navigate to and select the new icon
7. OK
9. Put the original user32.dll back and stop making ridiculous changes
Potato2

mywan

As Tedd said you do not need to change user32.dll. Simply make a copy of it, or another .dll with icon resources, and rename it to something else. You can then use seomething like resource hacker to change or swap out the icons it contains for the ones you want. Then address the icons like Ted explained. Do not change your functional user32.dll. From personal experience windows will often log failures due to such changes to system files and refuse to run even after you fix it.

If you understand the PE structure you can strip all the icons, and most other extraneous data, from a resource DLL and save it as a hex string template. Then use any scripting language to append the hex string, corresponding to the icons, to it and adjust the offsets to account for the size change. I once did this with AutoIt, so I could create an icon resource DLL on the fly any time using a simple GUI.