Per-pixel Alpha Blending of Windows

Hey guys and gals, I’ve been fiddling with ways to implement a custom window title bar but have had little progress. I’ve found this article http://duckmaestro.com/2010/06/06/per-pixel-alpha-blending-in-win32-desktop-applications/ but I am having trouble implementing the technique in my own code, I’ve looked at the UpdateLayeredWindow/SetLayeredWindowAttributes and Blendfunction in the Microsoft Dev site but just can’t make sense of it! If anyone has done anything like this before I’d really appreciate some help!

Bottom line is I am looking to make only the custom title bar of the window semi transparent while the border and remaining portions stay opaque

Hi,

Maybe this thread can help: https://forum.xojo.com/5071-how-to-create-a-transparent-window/0#p35672

or these: http://forums.realsoftware.com/viewtopic.php?f=6&t=38116&p=212533&hilit=SetLayeredWindowAttributes#p212533

http://forums.realsoftware.com/viewtopic.php?f=1&t=9849&hilit=SetLayeredWindowAttributes

Thanks for the reply unfortunately those threads all seem to be discussing custom shaped windows, or windows that are transparent (in their entirety) and not just parts (custom title bar) being semi transparent using a bitmap with an alpha channel.

Same technique. Instead of applying just an opaque picture, you apply the picture of the window you want with the semi transparent bar simulated.

Nothing prevents you to display the picture of a window onto a custom shaped one.

[quote=168399:@Michel Bujardet]Same technique. Instead of applying just an opaque picture, you apply the picture of the window you want with the semi transparent bar simulated.

Nothing prevents you to display the picture of a window onto a custom shaped one.[/quote]

Okay but all of those solutions simply use the declares where either a colour value is 100% transparent for the entire window, or the entire window is transparent by some alpha/255 value. How would I apply a bitmap with an alpha channel as an “alpha channel” for the window so that a portion of the window maybe 50% transparent, and the rest totally opaque.

Because as far as I understand those methods don’t apply an opaque picture, they just use a single colour value as a transparent value.