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

Adding controls to a layered window

29 views
Skip to first unread message

Matt Houser

unread,
Feb 9, 2010, 2:59:09 PM2/9/10
to
I want to add a button (CButton) to a layered window. However, the button
does not appear (maybe not possible?) but I can get click events if I click
where the button should be.

Is there a workaround?

...Matt

--
Matt Houser
http://www.insidercoding.com

AliR

unread,
Feb 10, 2010, 11:08:25 AM2/10/10
to
The controls on a layered window will have the same alpha channel as the
window. So the more transparent the window then the more transparent are the
controls on it.

AliR.

"Matt Houser" <ma...@houser.ca> wrote in message
news:DF70FC2D-93F4-4FF8...@microsoft.com...

Matt Houser

unread,
Feb 10, 2010, 12:27:53 PM2/10/10
to
I am using UpdateLayeredWindow() for per-pixel alpha blending, not
SetLayeredWindowAttributes().

...Matt

"AliR" <Al...@online.nospam> wrote in message
news:#13Riumq...@TK2MSFTNGP06.phx.gbl...

David Ching

unread,
Feb 10, 2010, 1:00:37 PM2/10/10
to
"Matt Houser" <ma...@houser.ca> wrote in message
news:0EAC7901-938D-4F79...@microsoft.com...

> I am using UpdateLayeredWindow() for per-pixel alpha blending, not
> SetLayeredWindowAttributes().
>

Unfortunately, child windows are not supported for these types of
translucent windows. I did have some success using just one HWND and
managing child "areas" myself, but I had to roll my own child window
manager.

For another project, we felt per pixel transparency was not worth giving up
child controls and just lived with 100% transparency defined for pixels of a
certain color. It depends on your usage, unfortunately you can't have both
per pixel transparency and child windows.

-- David

0 new messages