Sign in to follow this  
Followers 0
this-is-me

$WS_EX_TRANSPARENT

10 posts in this topic

I am trying to remove the background of a label because I have a label overlapping a picture. According to the info I have found on the web elsewhere, If $WS_EX_TRANSPARENT is used as an exstyle, then the background of the label should be removed. Here is the code:

GUISetControl("label", "Messages" & @CRLF & "Testing", 190, 5, 200, 26, 0, $WS_EX_TRANSPARENT)

Does it not work on labels, or am I doing something something wrong?


Who else would I be?

Share this post


Link to post
Share on other sites



WS_EX_TRANSPARENT also requires an internal API call to be made in order to actually change the opacity of a window/control.

Share this post


Link to post
Share on other sites

Then the simple question is can this be done in any form currently, and if not, could it be added as part of the backcolor of GUISetControlEx where if the background is a string "Transparent" then autoit would call the required api?


Who else would I be?

Share this post


Link to post
Share on other sites

I'll test this on a label or something, but I don't know if this will do exactly what you want as is. It might require more work (i.e. Using the other side of the API call I don't use). If you could point out what references on the web you found information on this, then I could answer better after seeing those.

Share this post


Link to post
Share on other sites

Thats a can of worms best left closed. Implementing this using that method basically takes over the entire drawing of the control. Thats a never-ending road once people figure out thats possible because you can pretty much cause controls to be drawn however you want when able to manipulate the API like that.

The code (albeit MFC) is simple and straightforward and easily ported to the Win32 API, so there's no need for my input. If Jon, JP, or Holger feel its worth the effort to start drawing controls manually to support more features, then one of them can make the decision to include it.

Share this post


Link to post
Share on other sites

Thats a can of worms best left closed.  Implementing this using that method basically takes over the entire drawing of the control.  Thats a never-ending road once people figure out thats possible because you can pretty much cause controls to be drawn however you want when able to manipulate the API like that.

The code (albeit MFC) is simple and straightforward and easily ported to the Win32 API, so there's no need for my input.  If Jon, JP, or Holger feel its worth the effort to start drawing controls manually to support more features, then one of them can make the decision to include it.

<{POST_SNAPBACK}>

That's the same situation I face when I want to have tab painted.

I agree with you Valik we are not colmating all windows API :ph34r:

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Oh well, I had hoped.

EDIT: How come this is so easy in VB? Why isn't it easy in autoit? There are more people that want this functionality as well: http://www.autoitscript.com/forum/index.php?showtopic=4918

Edited by this-is-me

Who else would I be?

Share this post


Link to post
Share on other sites

One of the primary focuses of VB is rapid GUI development. Also, you can gain access to the Windows API in VB, so it doesn't require it to be manually wrapped and exposed.

Share this post


Link to post
Share on other sites

Thanks, folks.


Who else would I be?

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
Sign in to follow this  
Followers 0