Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Possible to ALPHA-BLEND window FRAME?

0 views
Skip to first unread message

Nobody

unread,
Jul 13, 2006, 9:47:43 PM7/13/06
to
Is it possible to only alpha-blend portions of a window? for example, just
the frame? Normally with SetLayeredWindowAttributes() the whole window has a
constant alpha value, not very useful. UpdateLayeredWindow() supports per
pixel alpha-blending, but that function too is not very useful for top level
windows with child controls, as you would need to re-direct all the painting
to an offscreen DC which is not very practical since you would have to
re-write large portions of code and for some controls, I dont have the code
obviously, so its not even possible.

WindowsBlinds seems to be able to do this as in this screen shot:
http://www.stardock.com/products/windowblinds/wb5-3[1].jpg


David Ching

unread,
Jul 13, 2006, 10:48:18 PM7/13/06
to
"Nobody" <nob...@cox.net> wrote in message
news:3JCtg.704$_M.509@fed1read04...

As you say, UpdateLayeredWindow() is what has per-pixel alpha, but it does
not support child controls. But WindowBlinds only has the per-pixel alpha
blending in the frame surrounding the window. Maybe they create a separate
translucent window slightly bigger than the original and lay it behind the
original? So it looks like the original has the extra frame around it, but
it really is a new window peaking out behind it?

-- David


Nobody

unread,
Jul 13, 2006, 11:03:53 PM7/13/06
to

"David Ching" <d...@remove-this.dcsoft.com> wrote in message
news:12be1fi...@news.supernews.com...

David,

I tried that already. There is an issue of keeping the window positions
syncronized, there is always a lag between the two when you move them around
especially in full window drag mode.

Christian ASTOR

unread,
Jul 14, 2006, 6:33:23 AM7/14/06
to
Nobody wrote:

> Is it possible to only alpha-blend portions of a window? for example, just
> the frame?

Yes, you can change alpha level for any pixel after CreateDIBSection()

A quick test gives =>
http://www.upithere.com/view/1853.html

Nobody

unread,
Jul 14, 2006, 1:30:16 PM7/14/06
to

"Christian ASTOR" <cast...@club-internet.fr> wrote in message
news:uHMhtDzp...@TK2MSFTNGP04.phx.gbl...

Christian,

Do you have source or an executable demo somewhere? I'm not quite sure what
you mean by this. Is this using UpdatedLayeredWindow() or
SetLayeredWindowAttributes()?


Christian ASTOR

unread,
Jul 15, 2006, 1:32:46 AM7/15/06
to
Nobody wrote:

> Do you have source or an executable demo somewhere? I'm not quite sure what
> you mean by this. Is this using UpdatedLayeredWindow() or
> SetLayeredWindowAttributes()?

In fact, it's not interesting because it's with UpdateLayeredWindow()
and not very useful as you said in your case (WM_PRINT for child
controls)...

Steve

unread,
Jul 15, 2006, 4:33:35 AM7/15/06
to

There is no need for a 2nd window. You simply draw straight onto the
non-client area during a WM_NCPAINT event.

I think you can make the title bar and border bigger and smaller by
adjusting some system parameters first.

Nobody

unread,
Jul 15, 2006, 4:10:36 PM7/15/06
to

"Steve" <m...@home.com> wrote in message
news:44b8a849$0$3511$ed26...@ptn-nntp-reader01.plus.net...

What do you mean? I know I can draw directly onto the frame during a
WM_NCPAINT, but as we already discussed in this thread,
SetLayeredWindowAttributes doesn't seem to support per-pixel alpha-blending,
only the source constant alpha blending, so if I specify alpha=128, the
whole window is going to be alphablended at 128 including the client area.
UpdatedLayeredWindow supports per pixel alpha-blending, but it doesn't
support child windows and it requires redirecting all painting to an
offscreen DC which may not even be possible. Making the title bar and border
bigger is easy through WM_NCCALCSIZE.

0 new messages