jennico 4 Posted November 10, 2008 Share Posted November 10, 2008 (edited) $parent=GUICreate("") GUISetState() $child=GUICreate("",100,100,10,10 , 0x40000000, -1, $parent);$WS_CHILD GUISetBkColor(0xF20000) GUISetState() Sleep(2000) MsgBox(0,"setting trans",WinSetTrans($child,"",20)) MsgBox(0,"","does not work") no trans for a child or wrong code ? thx j. Edited November 10, 2008 by jennico Spoiler I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.Don't forget this IP: 213.251.145.96 Link to post Share on other sites
wraithdu 86 Posted November 10, 2008 Share Posted November 10, 2008 Seems to be tied to the transparency of the parent window. Link to post Share on other sites
jennico 4 Posted November 10, 2008 Author Share Posted November 10, 2008 not mentioned in help file Spoiler I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.Don't forget this IP: 213.251.145.96 Link to post Share on other sites
rasim 27 Posted November 10, 2008 Share Posted November 10, 2008 not mentioned in help fileHmm... like this? expandcollapse popup#include <GuiConstantsEx.au3> #include <WindowsConstants.au3> Global Const $SPI_GETWORKAREA = 48 $parent = GUICreate("Test", 300, 200) GUICtrlCreateLabel("Hello world!", 100, 50, 100, 15) $child = GUICreate("", 100, 100, -1, -1, BitOR($WS_VISIBLE, $WS_POPUP), -1, $parent) GUISetState(@SW_DISABLE) GUISetBkColor(0xF20000) WinSetTrans($child, "", 20) GUISetState(@SW_SHOW, $parent) GUIRegisterMsg($WM_WINDOWPOSCHANGING, "_WndProc") GUIRegisterMsg($WM_ACTIVATE, "_WndProc") While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _WndProc($hWnd, $Msg, $wParam, $lParam) Switch $hWnd Case $parent Switch $Msg Case $WM_ACTIVATE Local $wActive = BitAND($wParam, 0x0000FFFF) If $wActive Then Local $aPos = WinGetPos($parent) WinMove($child, "", $aPos[0] + 100, $aPos[1] + 65) EndIf Case $WM_WINDOWPOSCHANGING Local $WINDOWPOS = DllStructCreate("hwnd hWnd;hwnd hwndInsertAfter;int x;int y;int cx;int cy;uint flags", $lParam) Local $iX = DllStructGetData($WINDOWPOS, "x") Local $iY = DllStructGetData($WINDOWPOS, "y") ;Local $iWidth = DllStructGetData($WINDOWPOS, "cx") ;Local $iHeight = DllStructGetData($WINDOWPOS, "cy") WinMove($child, "", $iX + 100, $iY + 65) EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc Link to post Share on other sites
jennico 4 Posted November 10, 2008 Author Share Posted November 10, 2008 yes that's what it should look like. but with WS_Child style. this does not work it seems. thx j. Spoiler I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.Don't forget this IP: 213.251.145.96 Link to post Share on other sites
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