Home » U++ Library support » TopWindow&PopUp, TrayIcon » Tranparent TopWindow
Tranparent TopWindow [message #19800] |
Wed, 21 January 2009 23:26 |
galious
Messages: 28 Registered: March 2008
|
Promising Member |
|
|
Hi,
is it possible to create transparent TopWindow.
Calling in the constructor doesn't seem to work as the window-background is still painted on my Windows machine.
I would like to have a transparent top window (so you see the windows behind it or the desktop of the user) and still be able to show a text or image.
Best regards,
Martin
|
|
|
|
|
Re: Tranparent TopWindow [message #20116 is a reply to message #19901] |
Thu, 19 February 2009 08:18 |
galious
Messages: 28 Registered: March 2008
|
Promising Member |
|
|
Using GetHWND() was easy. However I would like to add the transparent possibility to Upp. It seems for Windows we've 2 possibilities:
1. When we call Transparent(bool isTransparent, Color color) immediately call SetLayeredWindowAttributes(...).
2. Store the color to be transparent and use it in UpdateLayeredWindow(...) once we're going to draw the window. However this will probably be slower, since the UpdateLayeredWindow always updates the entire window. I'm not sure what Upp does when updating the window (only parts, or the always complete window).
Could someone direct me where I can catch up how to do this in X11 / xlib, I suppose it will be with some kind of bitmask. In that case how do I convert very quickly from a colored image to a bitmask?
As you see I've extended the Transparent call with a parameter color. Windows expect you to set the color which should be transparent. Alternatively I could add a new method SetTransparentColor(Color color) so I don't have to adjust the Transparent-method.
As for which method to choose 1 or 2 I would like to consult the Upp developers; I think it's also important the Win32 and X11 method of doing transparency shouldn't differ to much, so someone reading the Win32 code should automatically have an understanding of the X11 code.
Does anybody know if it's possible (and how) to do alpha blending of windows in X11 / xlib? I figured while I'm implementing transparency I could add alpha blending as well.
Best regards,
Martin
|
|
|
Goto Forum:
Current Time: Fri Mar 29 12:24:26 CET 2024
Total time taken to generate the page: 0.01027 seconds
|