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

WS_EX_LAYERED with STATIC class (Windows class styles)

140 views
Skip to first unread message

vinaykabadi

unread,
Mar 18, 2009, 7:24:51 AM3/18/09
to
Hello,

I need to make my windows semi transparent.

If I register my own class and create window with WS_EX_LAYERED then
the window gets semi transparent (SetLayeredAttributes), but when I
use the windows predefined class i.e STATIC class then window tab is
taskbar but the window is hidden and never be shown.

Does the windows class dont support the WS_EX_LAYERED or what.
SetLayeredAttributes function is failing.

Kindly provide info.

Regards
Vinay

Remy Lebeau

unread,
Mar 18, 2009, 3:25:32 PM3/18/09
to

"vinaykabadi" <vinayk...@gmail.com> wrote in message
news:bcc5fb18-a0b1-46c0...@i20g2000prf.googlegroups.com...

> If I register my own class and create window with WS_EX_LAYERED
> then the window gets semi transparent (SetLayeredAttributes), but when
> I use the windows predefined class i.e STATIC class then window tab
> is taskbar but the window is hidden and never be shown.

Are you trying to apply WS_EX_LAYERED to a child window? That will not
work. WS_EX_LAYERED can only be used on top-level windows.

--
Remy Lebeau (TeamB)


vinaykabadi

unread,
Mar 19, 2009, 4:52:39 AM3/19/09
to
On Mar 19, 12:25 am, "Remy Lebeau" <no.s...@no.spam.com> wrote:
> "vinaykabadi" <vinaykaba...@gmail.com> wrote in message

Dear,

I am not trying WS_EX_LAYERED on Child windows, but on those windows
which are created with Static class. If I use my own registered class
then WS_EX_LAYERED works but it is not working with STATIC class.

Is it a bug with Windows or what

Regards
Vinay

Remy Lebeau

unread,
Mar 19, 2009, 6:31:30 PM3/19/09
to

"vinaykabadi" <vinayk...@gmail.com> wrote in message
news:e3628954-fc77-4228...@d25g2000prn.googlegroups.com...

> I am not trying WS_EX_LAYERED on Child windows

Then please show your actual code that is failing.

--
Remy Lebeau (TeamB)


Remy Lebeau

unread,
Mar 19, 2009, 6:53:22 PM3/19/09
to

"vinaykabadi" <vinayk...@gmail.com> wrote in message
news:e3628954-fc77-4228...@d25g2000prn.googlegroups.com...

> I am not trying WS_EX_LAYERED on Child windows, but on
> those windows which are created with Static class. If I use my
> own registered class then WS_EX_LAYERED works but it is
> not working with STATIC class.

STATIC windows are not usually used as their own top-level floating windows.
They are usually used as child windows. I don't know if they can even be
used as non-child windows.

--
Remy Lebeau (TeamB)


Remy Lebeau

unread,
Mar 19, 2009, 6:54:28 PM3/19/09
to

"vinaykabadi" <vinayk...@gmail.com> wrote in message
news:e3628954-fc77-4228...@d25g2000prn.googlegroups.com...

> I am not trying WS_EX_LAYERED on Child windows, but on
> those windows which are created with Static class. If I use my
> own registered class then WS_EX_LAYERED works but it is
> not working with STATIC class.

STATIC windows are not usually used as their own top-level floating windows.

They are usually used as child windows. I don't know if they can even be
used as non-child windows.

Why are you trying to create a floating STATIC window to begin with? Since
you know that WS_EX_LAYERED works for custom window classes, why not just
create a custom class that has a STATIC child window on it?

--
Remy Lebeau (TeamB)

0 new messages