qwert Posted June 22, 2013 Share Posted June 22, 2013 (edited) Generally speaking, does transparency work differently on Win 7/8 compared to XP? I have a application that places text over a PNG graphic using the grey.gif method as the basis for background transparency for the text layer. The method is used in several different ways in examples on these forums. But when I try to run the script under Win 7 or Win 8, the layer with the text is missing. I haven't been able to get a handle on what approach to use in determining what the differences might be. Has anyone experienced this situation? Thanks in advance for any help. Edited June 23, 2013 by qwert Link to comment Share on other sites More sharing options...
qwert Posted June 23, 2013 Author Share Posted June 23, 2013 I have noticed that the fogginess of my 3AM thinking resulted in me posting this to the wrong forum. Can someone kindly move it to GUI Help and Support? Many thanks. Link to comment Share on other sites More sharing options...
NewPlaza Posted June 24, 2013 Share Posted June 24, 2013 Got some code we can see? Link to comment Share on other sites More sharing options...
KaFu Posted June 24, 2013 Share Posted June 24, 2013 I think this might be related to DWM (Aero effects) on Vista and Win7 (maybe Win8 too?). DWM is using a buffer for painting, which is inaccessible afaik with the known APIs, and the order of control painting is reversed in that buffer. Try something like this:#include <GUIConstantsEx.au3> GUICreate("My GUI") If Not __DwmIsCompositionEnabled() Then ; control order for XP $c_Pic_A = GUICtrlCreatePic("a.jpg", 0, 0, 400, 100) $c_Pic_B = GUICtrlCreatePic("b.jpg", 0, 0, 400, 100) Else ; control order if DWM is enabled $c_Pic_B = GUICtrlCreatePic("b.jpg", 0, 0, 400, 100) $c_Pic_A = GUICtrlCreatePic("a.jpg", 0, 0, 400, 100) EndIf GUISetState(@SW_SHOW) Do Local $msg = GUIGetMsg() Until $msg = $GUI_EVENT_CLOSE Func __DwmIsCompositionEnabled() Local $IStruct = DllStructCreate("int;") DllCall("dwmapi.dll", "int", "DwmIsCompositionEnabled", "ptr", DllStructGetPtr($IStruct)) Return DllStructGetData($IStruct, 1) EndFunc ;==>__DwmIsCompositionEnabled OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
qwert Posted June 25, 2013 Author Share Posted June 25, 2013 (edited) Thank you for that tip. It got me thinking about other factors that might be involved. What I've found with my test script is that (apparently) Win 7/8 require their (newer) versions of some of the DLLs. When I compile the test script on a Win 8 PC, it displays layered text correctly. When the exact script is compiled under XP, but run under Win 8, the text is missing. I won't be able to compile my full script under Win 8 until next week, but I'm confident it's going to work. Edited June 26, 2013 by qwert Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now