View Single Post
  #4  
Old June 16th 20, 10:12 PM posted to rec.photo.digital,alt.comp.os.windows-10,alt.comp.freeware
Big Al
external usenet poster
 
Posts: 9
Default How do you edit an icon in one of the Windows system DLLs?

On 6/16/20 4:37 PM, this is what Ed Cryer wrote:
Ed Cryer wrote:
Arlen Holder wrote:
Two fundamentally basic Windows icon-editing questions:
(A) How do you edit an icon in one of the Windows system DLLs?
Â*Â*Â*Â* https://i.postimg.cc/43GKMY2Z/icon01.jpg
(B) Do you know _why_ the icon *changed* when viewed as a "large icon"?
Â*Â*Â*Â* https://i.postimg.cc/mrVr58FN/icon-ico.jpg
I was building a new shortcut for a multi-killswitch just now...
TARGET=%comspec% /c %Windir%\System32\taskkill.exe /im "prog1.exe" /t /f & %Windir%\System32\taskkill.exe /im "prog2.exe" /t /f

Where the icon I liked was inside the Windows system32 DLL:
%SystemRoot%\System32\SHELL32.dll

Only I wanted to overlay the classic angled red stripe across it.
o So I screenshotted it as a "large" icon so I could edit it as an ICO file

Lo and behold...
o https://i.postimg.cc/43GKMY2Z/icon01.jpg

The glove icon _changed_ right under my very own eyes!
o It was a "globe" when viewed as a small icon...
o It it _changed_ to a "dual-pane" when viewed as a larger icon.

Why?
o Has that ever happened to you?

Why does Windows do that?
o Have you noticed Windows _changes_ the icon depending on viewing size?

Anyway, I wasn't able to get the small icon large without it changing, so I
proceeded to use the large icon (which is a completely different icon!)
just to test the proof of concept of creating the icon from inside the DLL.
(1) I displayed the icon using "large icons" (which changed the icon!)
(2) I screenshotted it and opened it up in Irfanview freeware for edit
(3) In Irfanview I cropped with control+y & with control+shift+y
(4) In Irfanview I resized to 32x32 pixels as per the thread below
(5) I added a red stripe (which was the original goal)
(6) And I saved it as a *.ico icon file format from Irfanview
Â*Â*Â*Â* https://i.postimg.cc/mrVr58FN/icon-ico.jpg

Notice, in a sense, I failed to edit the original icon, so, the question
remains apropos as to whether you can tell me, and the rest of us so that
all benefit, how you would change the original globe icon from inside the
Windows system DLL.


Windows 10 and icons! It must drive some poor programmer at Microsoft into nightmares quite regularly!

Have you ever watched the WinExplorer output large size displays for a folder containing many different file types? It slowly paints them
across the screen, as it builds them.

The difference you mention occurs with many icons from the OS dlls. The library "Pictures", "Documents" and "Desktop" are typical. Usually
a yellow folder is added in the two higher formats.

BTW, have you ever wondered why "This PC" has to have its display rebuilt each time you select it? Same basic reason!

Ed


If you look at, eg,Â* shell32.dll with Icon Explorer (https://www.mitec.cz/iconex.html), and click on any icon, you'll see that it stores
several versions (often 8 or 9) for each one.
And therein lies the tale and explanation of the phenomena we've mentioned.

Ed

Windows uses ICO files and an ico can contain many different sizes, resolutions, or images in that one file. If you had an icon editor like
Greenfish Icon Editor Pro,(free), you could make your own, and it would show that you can make 32bit color, 8bit color etc. and sizes 8x8 up
to 256x256. Most icons come in several sizes so toolbars can use the small, the desktop can use various sizes as well as explorer using
several sizes.

To Arlen, I have used Resource Hacker to edit icons in program before, but it so long ago, I could never explain how if you paid me.

Al.