Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › How to set global Windows icon transparency via Shell DLL resources?
New Posts  All Forums:Forum Nav:

How to set global Windows icon transparency via Shell DLL resources?

post #1 of 3
Thread Starter 
Hey guys,

I'm looking for a Windows API "artist" to assist me in making a small tweak to Windows 7.

Basically, you know how when you set a file to be "hidden," Windows will fad that file's icon by half transparency? I am interesting in taking whatever UI function is doing that and applying it to ALL icon images being displayed in the UI. I would like every .ICO file of both system icons and any miscellaneous third-party icons to be just a little dimmer when displayed in the Start Menu, Task Bar, and Windows Explorer.

The reason for this is because I am working on a dark Classic UI and am finding that the most icons are now too bright and vibrant. Sure I could go into each and every .ICO file and edit the transparency there, but considering the quantity of system icons and the constant flow of new ones coming in and out with applications, it would be next to impossible to get them all. Or of course I could easily just do the 20 - 30 most common ones, but that would still feel incomplete and I'd constantly have to be updating new icons. Making Windows do the work would be ideal, and theoretically (in my mind) all you'd need to do is edit whatever function calls the display of UI bitmaps.

Here is a screenshot of my current progress of the UI.

I've had luck editing simple stuff in shellstyle.dll, but all of the more deeply rooted functions that globally control icon & image behavior are (judging by my research) buried in the binary code which I am unable to easily edit.

I've been perusing Microsoft MSDN Icon library to become framiliar with some of the syntax, but haven't been able to view any of it in action using Resource Hacker. Aside from finding an expert to assist me directly, I would also love any recommendations for what application to use and/or where exactly to locate this specific kind of function or how to decode the hex resources.

Thanks a ton!
Edited by toddfx - 4/18/12 at 12:08pm
post #2 of 3
I'm not sure what you're asking is possible without writing your own shell. Because doing it your way you'd have to analyse the IAT (or whatever the executable code in PE is stored) inside explorer.exe (assuming that's what is making the icon lib calls and not some other DLL) and then make the change there (assuming your resource editor allows saving - if not you need to then you that to search in a hex editor). You'd also need to ensure that all running processes for that library are killed before making the change and then hope that future Windows updates won't replace that library (which they probably will). Not to mention the scope for breaking your install because you patched it incorrectly.

Another method might be to have a separate application sitting in the background that scans the running processes and if it detects any explorer.exe processes then it gets the hwnd of the icon view and changes it's properties in memory. This will mean you may have a slight lag between opening an explorer instance and the dimming of the icons, but it's safer and more persistent than hacking system files.

Aside that, it might be worth checking TweakUI (if that's still around for Win7?) as I think that had a few icon options.
post #3 of 3
It sounds like you want to write a Shell Icon Handler (or maybe a Shell Icon Overlay Handler) that takes precedence over all other handlers, calls the next handler, and sets transparency to 50%. Or maybe the Hidden transparency effect is already a Shell Icon Handler and you just need to make it take precedence.

The following page and the page labeled Icon handlers should point you in the right direction, even though they're not too detailed on their own.
http://msdn.microsoft.com/en-us/library/windows/desktop/cc144067(v=vs.85).aspx

The Icon handlers page explains how it works in a nutshell - you get the filename, so you just need to find a way to call the next icon handler in line and get the icon it has for this file, and apply a filter to make the icon semi-transparent.

edit: In-depth explanation at http://www.scribd.com/doc/51635014/43/Icon-handlers
Edited by Coma - 4/24/12 at 3:53pm
Akiyama Mio
(13 items)
 
  
CPUMotherboardGraphicsRAM
E6420 @ stock, 0.98v Asus P5N-E SLI Gainward GTX 460 1GB @ 800/1600/1900 2x2GB Kingston @ 800MHz 5-5-5-15 2T 
Hard DriveOptical DriveOSMonitor
WD 250GB, 320GB SATA/3, 16MB Cache, Seagate 1TB LG GSA-H62N 18x SATA Ubuntu 9.10 x86 & Win7 x86 Asus VW222U 
KeyboardPowerCase
Logitech Classic Corsair 650HX NZXT Apollo Black 
  hide details  
Reply
Akiyama Mio
(13 items)
 
  
CPUMotherboardGraphicsRAM
E6420 @ stock, 0.98v Asus P5N-E SLI Gainward GTX 460 1GB @ 800/1600/1900 2x2GB Kingston @ 800MHz 5-5-5-15 2T 
Hard DriveOptical DriveOSMonitor
WD 250GB, 320GB SATA/3, 16MB Cache, Seagate 1TB LG GSA-H62N 18x SATA Ubuntu 9.10 x86 & Win7 x86 Asus VW222U 
KeyboardPowerCase
Logitech Classic Corsair 650HX NZXT Apollo Black 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › How to set global Windows icon transparency via Shell DLL resources?