How do I make Icons Transparent using C++?

Panarchy's Avatar, Join Date: Nov 2007
Contributor
Hello

How do I make icon labels transparent using C++?

More info: Make XP Desktop Icon Label Transparent

Please tell me if this is possible to do via C++.

Thanks in advance,

Panarchy

PS: I would like whichever method you suggest to me to be able to run without launching of a command-prompt window.
0
xpi0t0s's Avatar, Join Date: Aug 2004
Mentor
This is probably in the Registry somewhere, so what I'd do is to install a utility like RegShot, take a registry snapshot, perform the actions in the page you linked to, take a second registry snapshot and compare the two. RegShot does all that for you and produces a difference report.

And the way to do this without launching a command prompt window as I've already told you once is to write the program as a Windows program starting with WinMain, not as a simple main() program because the latter will give you a command prompt however briefly. You need to find out how your compiler supports Windows programs so that you don't get an "unresolved symbol: main" error at link time.

For MinGW for example you need to specify the flag -mwindows. See http://www.osix.net/modules/article/?id=670
0
Panarchy's Avatar, Join Date: Nov 2007
Contributor
Hello

Thanks for your reply.

Not a bad idea, to do as you say.

After thinking about it for a while, since registry changes are involved, it'd probably be best for me to write it into the actual installer.

NSIS

What are your thoughts on this?

Panarchy
0
xpi0t0s's Avatar, Join Date: Aug 2004
Mentor
Dunno, there's a lot of context I haven't got a clue about here. What installer?
0
Panarchy's Avatar, Join Date: Nov 2007
Contributor
NSIS

(NullSoft)
0
Panarchy's Avatar, Join Date: Nov 2007
Contributor
I've worked it out (with a little help from usenet).

Add the following to your NSIS script to achieve transparency on your icon text labels;
Code:
Section "Icon Text Label"

WriteRegDWORD HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer
\Advanced" "ListviewShadow" 1
SendMessage ${HWND_BROADCAST} ${WM_SETTINGCHANGE} 0 "STR:Environment" 

SectionEnd
Enjoy

Panarchy