Jump to content

Transparency issues


 Share

Recommended Posts

$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
Link to comment
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.
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...