BrendonKoz

Possible transparent window (background?) with fully opaque text / controls?

3 posts in this topic

I'm unfortunately not familiar enough with AutoIt to fluidly think of a way that I might accomplish this task. I'm trying to figure out a way to create a (WS_POPUP) GUI window that contains no window chrome, has a background color set, but is partially transparent (alpha transparency?), yet has controls and/or text that are fully opaque (0% transparent).

I've found the following topic that discuss transparency with regard to a window, but it seems to oly handle fully transparent windows:

There's also WinSetTrans(), but this doesn't seem to provide an ability to set ONLY the parent window's transparency, but leave the children objects' current opacity level untouched. I thought maybe GDI would help, but after looking through the _WinAPI functions I didn't see anything that stood out to me. I also thought that perhaps using embedded IE might work, but...I am looking to dynamically change values within the GUI (potentially) somewhat rapidly and do not know if embedded IE would really be a resource efficient model to use (I'm thinking not). I haven't yet used the IE tools to create a GUI so am completely new that to aspect, I only know it exists as an option but that's about it.

Has anyone done something like this, or potentially know of a way to handle it?

Share this post


Link to post
Share on other sites



BrendonKoz,

Have you looked at the example in the Help file for function _WinAPI_SetLayeredWindowAttributes?

kylomas


Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

Share this post


Link to post
Share on other sites

I have and it's the closest example that I could see. It seems that it handles either alpha transparency of the entirety of the window, or it makes the background entirely transparent. I'm looking for something inbetween both of those options where only the background is partially transparent, but the controls within the window have no opacity (they're fully opaque). ...similar in effect to the window chrome of Windows 7 applications with Aero Glass (the chrome is semi-transparent, but the text/controls such as the window title are fully visible).

I think either GDI or _WinAPI_SetLayeredWindowAttributes would be the way to go, but I'm not seeing a way - unless I'm missing something obvious (very possible) - to get this to work as intended.

 

It looks like WinAPI_SetLayered is exactly what I needed. Using the term "aero glass" lead me to finding some example code that does precisely what I was describing.

I can use that as a starting point to move forward, and take apart the example from the manual to determine the difference as well.

Thanks, kylomas!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now