Go4Expert

Go4Expert (http://www.go4expert.com/)
-   MFC (http://www.go4expert.com/forums/mfc/)
-   -   How do I make Icons Transparent using C++? (http://www.go4expert.com/forums/i-icons-transparent-using-cpp-t17083/)

Panarchy 24Apr2009 05:58

How do I make Icons Transparent using C++?
 
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.

xpi0t0s 24Apr2009 11:57

Re: How do I make Icons Transparent using C++?
 
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

Panarchy 24Apr2009 16:07

Re: How do I make Icons Transparent using C++?
 
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

xpi0t0s 24Apr2009 16:18

Re: How do I make Icons Transparent using C++?
 
Dunno, there's a lot of context I haven't got a clue about here. What installer?

Panarchy 24Apr2009 16:21

Re: How do I make Icons Transparent using C++?
 
NSIS

(NullSoft)

Panarchy 26Apr2009 15:36

Re: How do I make Icons Transparent using C++?
 
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


All times are GMT +5.5. The time now is 21:26.