Sign in to follow this  
Followers 0
Pottery

Transparency issues

2 posts in this topic

#1 ·  Posted (edited)

$hGUI2 = GUICreate('', 16, 31, 430, 500, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD), $hGUI)
$Pic = GUICtrlCreatePic('pfront.bmp', 0, 0, 16, 31)

I did BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD) so the white background on my image would dissapear; and it did.

When I do

GUICtrlSetImage($Pic, 'pback.bmp')

The white background is back again until I change it back to pfront.bmp, any ideas?

Edited by Epdmk

Share this post


Link to post
Share on other sites



$hGUI2 = GUICreate('', 16, 31, 430, 500, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD), $hGUI)
$Pic = GUICtrlCreatePic('pfront.bmp', 0, 0, 16, 31)

I did BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD) so the white background on my image would dissapear; and it did.

When I do

GUICtrlSetImage($Pic, 'pback.bmp')

The white background is back again until I change it back to pfront.bmp, any ideas?

I don't know, but the transparent colour for a WS_EX_LAYERED window is set to the colour in the top left pixel of the last bitmap loaded, so maybe that is the problem. (That is unless you specifically set it to some other colour, see below.)

I gues it's only because in AutoIt a WS_EX_MIDICHILD window is not a real child but is simulated that transparency works at all, because you can't have a transparent child window.

Search for _API_SetLayeredWindowAttributes in these forums which might help you.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

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