Possible to ALPHA-BLEND window FRAME? - Programmer

This is a discussion on Possible to ALPHA-BLEND window FRAME? - Programmer ; 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 ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Possible to ALPHA-BLEND window FRAME?

  1. Possible to ALPHA-BLEND window FRAME?

    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





  2. Re: Possible to ALPHA-BLEND window FRAME?

    "Nobody" wrote in message
    news:3JCtg.704$_M.509@fed1read04...
    > 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
    >


    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



  3. Re: Possible to ALPHA-BLEND window FRAME?


    "David Ching" wrote in message
    news:12be1fico3s4ua9@news.supernews.com...
    > "Nobody" wrote in message
    > news:3JCtg.704$_M.509@fed1read04...
    >> 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
    >>

    >
    > 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
    >


    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.




  4. Re: Possible to ALPHA-BLEND window FRAME?

    Nobody wrote:
    > "David Ching" wrote in message
    > news:12be1fico3s4ua9@news.supernews.com...
    >> "Nobody" wrote in message
    >> news:3JCtg.704$_M.509@fed1read04...
    >>> 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
    >>>

    >> 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
    >>

    >
    > 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.
    >
    >
    >


    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.

  5. Re: Possible to ALPHA-BLEND window FRAME?


    "Steve" wrote in message
    news:44b8a849$0$3511$ed2619ec@ptn-nntp-reader01.plus.net...
    > Nobody wrote:
    >> "David Ching" wrote in message
    >> news:12be1fico3s4ua9@news.supernews.com...
    >>> "Nobody" wrote in message
    >>> news:3JCtg.704$_M.509@fed1read04...
    >>>> 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
    >>>>
    >>> 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
    >>>

    >>
    >> 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.
    >>
    >>
    >>

    >
    > 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.


    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.




+ Reply to Thread