views:

131

answers:

2

Hello,

I'm trying to do something like Rainmeter do to its windows, that is use the full transparency in a window but we still read the text of each window.

Anyone can explain me how this is done? how we set the full transparency in a window and show certain parts of this window (like text or other things).

I can do this with regions but seems to me that it's not like Rainmeter does, anyone knows how can i do this in c++ (WinXP and above)?

Thanks

+2  A: 

You need to use layered windows.

SLaks
Ok i believe that this is accomplish using the layered windows, but i already try this and the window is totally transparent using the WS_EX_LAYERED and setting the alpha to 0, so all the drawings or text in the windows are transparent too.I still cant understand how this is accomplish, but i will try to read the code that nobugz point to me, thanks anyway.
Nuno
A: 

In answer to your comment:

To make part of the window transparent, call the UpdateLayerdWindow function and give it a partially transparent background image.

You can also pass the ULW_COLORKEY instead of giving a partially transparent background image, and every part of the window that is the color you specify will become transparent. (most people use magenta). However, if you do it this way, you can't make part of the window semitransparent.

SLaks
Ok SLaks i now understand after seeing more examples. The secret is to use an image that already have the alpha transparency.
Nuno