Mal Reynolds
October 28th, 2009, 05:24 PM
what i'm trying to achieve is similar to this image of Norton Internet Security 2009. (http://img229.imageshack.us/img229/8726/nis2009yt2.jpg) if you look closely you can see that the main background of the window is alpha blended and you can see the desktop behind it a little, yet the icons, text, and controls, 'child windows' and such have full opacity.
Here is my way of implementing this:
Note: UpdateLayeredWindow() is not compatible with child windows since it redirects drawing and foregoes WM_PAINT messages.
1) create a layered top-level popup window and set it's alpha with UpdateLayeredWindow().
2) create another top-level window the same size and set a transparent colorkey; then fill that entire window with that color, that way, only the child windows will be visible.
3) place the second window above the first and handle the appropriate window z-positioning and moving other window when one moves.
My Question:
Is this the most efficient way of implementing this, or is there a simpler way that I just havn't come across yet? I will if i have to, but i'd rather not do a dual-window approach. thank you for any input you may have!
Here is my way of implementing this:
Note: UpdateLayeredWindow() is not compatible with child windows since it redirects drawing and foregoes WM_PAINT messages.
1) create a layered top-level popup window and set it's alpha with UpdateLayeredWindow().
2) create another top-level window the same size and set a transparent colorkey; then fill that entire window with that color, that way, only the child windows will be visible.
3) place the second window above the first and handle the appropriate window z-positioning and moving other window when one moves.
My Question:
Is this the most efficient way of implementing this, or is there a simpler way that I just havn't come across yet? I will if i have to, but i'd rather not do a dual-window approach. thank you for any input you may have!