jennico Posted January 27, 2008 Posted January 27, 2008 (edited) hi world ! #include <GuiConstants.au3> $Main_GUI = GUICreate("Main") $Btn_Exit = GUICtrlCreateButton("E&xit", 10, 10, 90, 20) GUISetState(@SW_SHOW, $Main_GUI) $Child_GUI = GUICreate("Child", 200, 100, 10, 50);, $WS_POPUP );,$WS_EX_LAYERED GUISetBkColor(0xfffaf0, $Child_GUI) $Btn_Test = GUICtrlCreateButton("Test", 10, 10, 90, 20) GUISetState(@SW_SHOW, $Child_GUI) DllCall("user32.dll", "int", "SetParent", "hwnd", WinGetHandle($Child_GUI), "hwnd", WinGetHandle($Main_GUI)) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $Btn_Exit Exit Case $Btn_Test MsgBox(0, "Test", "Hit Button on Child Window") EndSwitch WEnd the code is exactly what i need: a child window stuck within the parent. but i need a transparent (transparent background, not set transparency) child without borders. but how, since $WS_EX_LAYERED does not work with child windows ? thx j. Edited January 27, 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
martin Posted January 27, 2008 Posted January 27, 2008 hi world ! #include <GuiConstants.au3> $Main_GUI = GUICreate("Main") $Btn_Exit = GUICtrlCreateButton("E&xit", 10, 10, 90, 20) GUISetState(@SW_SHOW, $Main_GUI) $Child_GUI = GUICreate("Child", 200, 100, 10, 50);, $WS_POPUP );,$WS_EX_LAYERED GUISetBkColor(0xfffaf0, $Child_GUI) $Btn_Test = GUICtrlCreateButton("Test", 10, 10, 90, 20) GUISetState(@SW_SHOW, $Child_GUI) DllCall("user32.dll", "int", "SetParent", "hwnd", WinGetHandle($Child_GUI), "hwnd", WinGetHandle($Main_GUI)) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $Btn_Exit Exit Case $Btn_Test MsgBox(0, "Test", "Hit Button on Child Window") EndSwitch WEnd the code is exactly what i need: a child window stuck within the parent. but i need a transparent (transparent background, not set transparency) child without borders. but how, since $WS_EX_LAYERED does not work with child windows ? thx j. Not sure if this is the sort of thing you want but have a look #include <GuiConstants.au3> #include <windowsconstants.au3> $Main_GUI = GUICreate("Main") $Btn_Exit = GUICtrlCreateButton("E&xit", 10, 10, 90, 20) GUISetState(@SW_SHOW, $Main_GUI) $Child_GUI = GUICreate("Child", 200, 100, 10, 50, $WS_POPUP );,$WS_EX_LAYERED GUISetBkColor(0xfffaf0, $Child_GUI) $Btn_Test = GUICtrlCreateButton("Test", 10, 10, 90, 20) GUISetState(@SW_SHOW, $Child_GUI) DllCall("user32.dll", "int", "SetParent", "hwnd", WinGetHandle($Child_GUI), "hwnd", WinGetHandle($Main_GUI)) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $Btn_Exit Exit Case $Btn_Test MsgBox(0, "Test", "Hit Button on Child Window") $masterMask = CreateMasterMask(); AddMask($masterMask,$Child_GUI,$Btn_Test);add button to mask FitMask($masterMask,$Child_GUI);apply the mask to the window EndSwitch WEnd Func CreateMasterMask() return DllCall("gdi32.dll", "long", "CreateRectRgn", "long", 0, "long", 0, "long", 0, "long", 0) EndFunc Func FitMask($aMask,$hWnd) DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $hWnd, "long", $aMask[0], "int", 1) endfunc Func AddMask(ByRef $MM, $hWnd, $ID) $pp = ControlGetPos($hWnd,'',$ID) Local $Mask1 = DllCall("gdi32.dll", "long", "CreateRectRgn", "long", $pp[0], "long", $pp[1], "long", $pp[0] + $pp[2], "long",$pp[1] + $pp[3]) DllCall("gdi32.dll", "long", "CombineRgn", "long", $MM[0], "long", $Mask1[0], "long", $MM[0],"int",2) EndFunc 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.
rover Posted January 27, 2008 Posted January 27, 2008 or this? #include <GuiConstants.au3> $Main_GUI = GUICreate("Main") $Btn_Exit = GUICtrlCreateButton("E&xit", 10, 10, 90, 20) GUISetState(@SW_SHOW, $Main_GUI) $Child_GUI = GUICreate("Child", 200, 100, 10, 50, $WS_POPUP,BitOR($WS_EX_MDICHILD,$WS_EX_TRANSPARENT),$Main_GUI) GUISetBkColor(0xfffaf0, $Child_GUI) $Btn_Test = GUICtrlCreateButton("Test", 10, 10, 90, 20) GUISetState(@SW_SHOW, $Child_GUI) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $Btn_Exit Exit Case $Btn_Test MsgBox(0, "Test", "Hit Button on Child Window") EndSwitch WEnd I see fascists...
martin Posted January 27, 2008 Posted January 27, 2008 or this? #include <GuiConstants.au3> $Main_GUI = GUICreate("Main") $Btn_Exit = GUICtrlCreateButton("E&xit", 10, 10, 90, 20) GUISetState(@SW_SHOW, $Main_GUI) $Child_GUI = GUICreate("Child", 200, 100, 10, 50, $WS_POPUP,BitOR($WS_EX_MDICHILD,$WS_EX_TRANSPARENT),$Main_GUI) GUISetBkColor(0xfffaf0, $Child_GUI) $Btn_Test = GUICtrlCreateButton("Test", 10, 10, 90, 20) GUISetState(@SW_SHOW, $Child_GUI) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $Btn_Exit Exit Case $Btn_Test MsgBox(0, "Test", "Hit Button on Child Window") EndSwitch WEnd Yes, much better rover. 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.
jennico Posted January 27, 2008 Author Posted January 27, 2008 thank you rover: this is nice, but i don't want the child to be visible outside the parent. i want it to vanish when leaving the parent. martin: i am still trying your example, seems excellent. 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
jennico Posted January 27, 2008 Author Posted January 27, 2008 Ok, i tried the two examples. the problem is: neither of them is a transparent child window. see my examples. the parent's label is not visible when the child passes. i need a really transparent child gui ! example martin: expandcollapse popup#include <GuiConstants.au3> #include <windowsconstants.au3> $Main_GUI = GUICreate("Main") GUISetBkColor(0xffffff) GUICtrlCreateLabel("bbbbbbbbbbbbbbb bbbbbbbbbb bbbbbbbbbbbbb bbbbbbbb",200,80,50,50) GUIctrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT) $Btn_Exit = GUICtrlCreateButton("E&xit", 10, 10, 90, 20) GUISetState(@SW_SHOW, $Main_GUI) $Child_GUI = GUICreate("Child", 100, 100, 10, 50, $WS_POPUP );,$WS_EX_LAYERED $label=GUICtrlCreateLabel("bbbbbbbbbbbbbbb bbbbbbbbbb bbbbbbbbbbbbb bbbbbbbb",5,5,50,50) GUIctrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT) $Btn_Test = GUICtrlCreateButton("Test", 10, 10, 90, 20) GUISetState(@SW_SHOW, $Child_GUI) DllCall("user32.dll", "int", "SetParent", "hwnd", WinGetHandle($Child_GUI), "hwnd", WinGetHandle($Main_GUI)) $i=10 While 1 $i+=1 $msg=GUIGetMsg() If $msg=$GUI_EVENT_CLOSE Or $msg=$Btn_Exit Then Exit If $msg= $Btn_Test Then MsgBox(0, "Test", "Hit Button on Child Window") $masterMask = CreateMasterMask(); AddMask($masterMask,$Child_GUI,$label);add button to mask FitMask($masterMask,$Child_GUI);apply the mask to the window EndIf WinMove($Child_GUI,"",$i,50) Sleep(100) WEnd Func CreateMasterMask() return DllCall("gdi32.dll", "long", "CreateRectRgn", "long", 0, "long", 0, "long", 0, "long", 0) EndFunc Func FitMask($aMask,$hWnd) DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $hWnd, "long", $aMask[0], "int", 1) endfunc Func AddMask(ByRef $MM, $hWnd, $ID) $pp = ControlGetPos($hWnd,'',$ID) Local $Mask1 = DllCall("gdi32.dll", "long", "CreateRectRgn", "long", $pp[0], "long", $pp[1], "long", $pp[0] + $pp[2], "long",$pp[1] + $pp[3]) DllCall("gdi32.dll", "long", "CombineRgn", "long", $MM[0], "long", $Mask1[0], "long", $MM[0],"int",2) EndFuncoÝ÷ ÙìZ^®Þ«¢+Ø¥¹±Õ±ÐíÕ¥ ½¹ÍѹÑ̹ÔÌÐì(ÀÌØí5¥¹}U$ôU% ÉÑ ÅÕ½Ðí5¥¸ÅÕ½Ðì°ÔÀÀ°ÔÀÀ°À°À¤)U%MÑ ½±½È Áá¤(ÀÌØí ѹ}á¥ÐôU% Ñɱ ÉÑ ÕÑѽ¸ ÅÕ½ÐíµÀíá¥ÐÅÕ½Ðì°ÄÀ°ÄÀ°äÀ°ÈÀ¤)U% Ñɱ ÉÑ1° ÅÕ½ÐíÅÕ½Ðì°ÈÀÀ°àÀ°ÔÀ°ÔÀ¤(íU%ÑɱMÑ ½±½È ´Ä°ÀÌØíU%} - =1=I}QI9MAI9P¤)U%MÑMÑÑ¡M]}M!=°ÀÌØí5¥¹}U$¤(ÀÌØí ¡¥±}U$ôU% ÉÑ ÅÕ½Ðí ¡¥±ÅÕ½Ðì°ÄÀÀ°ÄÀÀ°ÄÀ°ÔÀ°´Ä± ¥Ñ=H ÀÌØí]M}a}5% !%1°ÀÌØí]M}a}QI9MAI9P¤°ÀÌØí5¥¹}U$¤(ÀÌØí±°õU% Ñɱ ÉÑ1° ÅÕ½ÐíÅÕ½Ðì°Ô°Ô°ÔÀ°ÔÀ¤)U%ÑɱMÑ ½±½È ´Ä°ÀÌØíU%} - =1=I}QI9MAI9P¤(ÀÌØí ѹ}QÍÐôU% Ñɱ ÉÑ ÕÑѽ¸ ÅÕ½ÐíQÍÐÅÕ½Ðì°ÄÀ°ÄÀ°äÀ°ÈÀ¤)U%MÑMÑÑ¡M]}M!=°ÀÌØí ¡¥±}U$¤(ÀÌØí¤ôÄÀ)]¡¥±Ä($ÀÌØí¤¬ôÄ(ÀÌØíµÍõU%Ñ5Í ¤(%%ÀÌØíµÍôÀÌØíU%}Y9Q} 1=M=ÈÀÌØíµÍôÀÌØí ѹ}á¥ÐQ¡¸á¥Ð(%ÀÌØíµÍôÀÌØí ѹ}QÍÐQ¡¸5Í ½à À°ÅÕ½ÐíQÍÐÅÕ½Ðì°ÅÕ½Ðí!¥Ð ÕÑѽ¸½¸ ¡¥±]¥¹½ÜÅÕ½Ðì¤(%]¥¹5½Ù ÀÌØí ¡¥±}U$°ÅÕ½ÐìÅÕ½Ðì°ÀÌØí¤°ÔÀ¤(%M±À ÄÀÀ¤)]¹ please, i still need help ! 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
jennico Posted January 27, 2008 Author Posted January 27, 2008 (edited) i want to precizise my demand: i need a really transparent (layered) child window in popup style that is stuck to its parent window (moved with the parent window, mdi style) and that will not be displayed out of the parent's boundaries. in fact, in the same way as a transparent control would behave. (please don't tell me to use a transparent control. i want to move a group of controls and avoid the horrible flickering when moving them seperately, that's why i need this child.) thx j. Edited January 27, 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
jennico Posted January 27, 2008 Author Posted January 27, 2008 bumpi want to precizise my demand: i need a really transparent (layered) child window in popup style that is stuck to its parent window (moved with the parent window, mdi style) and that will not be displayed out of the parent's boundaries. in fact, in the same way as a transparent control would behave.not possible ?!? 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
Siao Posted January 27, 2008 Posted January 27, 2008 (edited) #include <GuiConstantsEx.au3> $Main_GUI = GUICreate("Main",500,500,-1,-1) GUISetBkColor(0xffffff) $Btn_Exit = GUICtrlCreateButton("E&xit", 10, 10, 90, 20) GUICtrlCreateLabel("bbbbbbbbbbbbbbb bbbbbbbbbb bbbbbbbbbbbbb bbbbbbbb",200,80,50,50) ;GUIctrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT) GUISetState(@SW_SHOW, $Main_GUI) $Child_GUI = GUICreate("Child", 100, 100, 10, 50, $WS_CHILD, $WS_EX_TRANSPARENT, $Main_GUI) GUISetBkColor(0xffffff) $label=GUICtrlCreateLabel("bbbbbbbbbbbbbbb bbbbbbbbbb bbbbbbbbbbbbb bbbbbbbb",5,5,50,50) GUIctrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT) $Btn_Test = GUICtrlCreateButton("Test", 10, 10, 90, 20) GUISetState(@SW_SHOW, $Child_GUI) $i=10 While 1 $i+=1 $msg=GUIGetMsg() If $msg=$GUI_EVENT_CLOSE Or $msg=$Btn_Exit Then Exit If $msg=$Btn_Test Then MsgBox(0, "Test", "Hit Button on Child Window") WinMove($Child_GUI,"",$i,50) Sleep(100) WEnd Btw, having Sleep() in main message loop is a no no. Edited January 27, 2008 by Siao "be smart, drink your wine"
martin Posted January 27, 2008 Posted January 27, 2008 bump not possible ?!? To get the effect you want (or the effect I think you want) I don't see why you need a child window. Try this #include <windowsconstants.au3> #include <guiconstantsex.au3> $Main_GUI = GUICreate("Main") GUISetBkColor(0xffffff) GUICtrlCreateLabel("bbbbbbbbbbbbbbb bbbbbbbbbb bbbbbbbbbbbbb bbbbbbbb",100,80,50,50) $label = GUICtrlCreateLabel("overthetop",90,80,60,21) GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT) $Btn_Test = GUICtrlCreateButton("test",80,100,60,21) $Btn_Exit = GUICtrlCreateButton("E&xit", 10, 10, 60, 20) GUISetState(@SW_SHOW, $Main_GUI) $Rect = DllStructCreate("int;int;int;int") DllStructSetData($rect,2,80) DllStructSetData($rect,4,122) $pRect = DllStructGetPtr($rect) $i=10 While 1 DllStructSetData($rect,1,$i) DllStructSetData($rect,3,$i + 62) $msg=GUIGetMsg() If $msg=$GUI_EVENT_CLOSE Or $msg=$Btn_Exit Then Exit If $msg= $Btn_Test Then MsgBox(0, "Test", "Hit Button on Child Window") EndIf $i += 1 ControlMove("Main","",$label,$i,80) ControlMove("Main","",$Btn_Test,$i,100) DllCall("user32.dll", "int", "InvalidateRect", "hwnd", $Main_GUI, "int", $prect, "int", 1) Sleep(50) WEnd 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.
jennico Posted January 27, 2008 Author Posted January 27, 2008 hello martin,that is what i started with, of course.To get the effect you want (or the effect I think you want) I don't see why you need a child window.(please don't tell me to use a transparent control. i want to move a group of controls and avoid the horrible flickering when moving them seperately, that's why i need this child.)just change the bk color (no white, no grey) of the gui and make several moving labels, and you will get horrible flickering. but your script shows what it should look like in the end.hi siao,still no real transparency in your example. i need real blending.thx you all but still not what i need.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
martin Posted January 27, 2008 Posted January 27, 2008 Btw, having Sleep() in main message loop is a no no. True, I'd better show my example without that expandcollapse popup#include <windowsconstants.au3> #include <guiconstantsex.au3> AdlibEnable("Incr",50) Global $i = 10,$j $Main_GUI = GUICreate("Main") GUISetBkColor(0xffffff) GUICtrlCreateLabel("bbbbbbbbbbbbbbb bbbbbbbbbb bbbbbbbbbbbbb bbbbbbbb",100,80,50,50) $label = GUICtrlCreateLabel("overthetop",90,80,60,21) GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT) $Btn_Test = GUICtrlCreateButton("test",80,100,60,21) $Btn_Exit = GUICtrlCreateButton("E&xit", 10, 10, 60, 20) GUISetState(@SW_SHOW, $Main_GUI) $Rect = DllStructCreate("int;int;int;int") DllStructSetData($rect,2,80) DllStructSetData($rect,4,122) $pRect = DllStructGetPtr($rect) While 1 DllStructSetData($rect,1,$i) DllStructSetData($rect,3,$i + 62) $msg=GUIGetMsg() If $msg=$GUI_EVENT_CLOSE Or $msg=$Btn_Exit Then Exit If $msg= $Btn_Test Then MsgBox(0, "Test", "Hit Button on Child Window") EndIf if $j <> $i then ControlMove("Main","",$label,$i,80) ControlMove("Main","",$Btn_Test,$i,100) DllCall("user32.dll", "int", "InvalidateRect", "hwnd", $Main_GUI, "int", $prect, "int", 1) $j = $i EndIf ;Sleep(50);tut tut WEnd Func Incr() $i += 1 EndFunc 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.
jennico Posted January 27, 2008 Author Posted January 27, 2008 btw: martin, can you give me a reference to DllCall("user32.dll", "int", "InvalidateRect", "hwnd", $Main_GUI, "int", $prect, "int", 1) in the forum ?i read msdn but i don't really understand, what they mean with "invalidate".$Rect = DllStructCreate("int;int;int;int")DllStructSetData($rect,2,80)DllStructSetData($rect,4,122)$pRect = DllStructGetPtr($rect)DllStructSetData($rect,1,$i)DllStructSetData($rect,3,$i + 62)what are the variants ?cheers 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
jennico Posted January 27, 2008 Author Posted January 27, 2008 (edited) flicker problem- remove InvalidateRect calls (this cause flickering)hmm ???????that's why a child would be better !j.well, but i really don't want to discuss why i need this child, this strays from the point. better tell me how to make a layered child gui.:-) Edited January 27, 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
martin Posted January 27, 2008 Posted January 27, 2008 flicker problem???????that's why a child would be better !j.Have you looked at this?Basically if you invalidate a region I understand it to mean that the area displayed is no longer valid so windows must redraw it. 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.
jennico Posted January 27, 2008 Author Posted January 27, 2008 ja, i have exactly this site open ..... does not help too much i think. anyway, i wanted to use the child gui exactly for the reason of avoiding flickering .... but invalidate seems to force flickers. 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
Siao Posted January 27, 2008 Posted January 27, 2008 (edited) Ok, last try (since I really don't quite understand what are you trying to do). #include <GuiConstantsEx.au3> Const $WS_EX_COMPOSITED = 0x2000000 $Main_GUI = GUICreate("Main",500,500,-1,-1, -1,$WS_EX_COMPOSITED) ;~ GUISetBkColor(0xffffff) $Btn_Exit = GUICtrlCreateButton("E&xit", 10, 10, 90, 20) GUICtrlCreateLabel("aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaa",200,80,50,50, -1,$WS_EX_TRANSPARENT) GUIctrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT) GUISetState(@SW_SHOW, $Main_GUI) $Child_GUI = GUICreate("Child", 100, 100, 10, 50, $WS_CHILD, BitOR($WS_EX_TRANSPARENT,$WS_EX_TOPMOST), $Main_GUI) ;~ GUISetBkColor(0xffffff) $label=GUICtrlCreateLabel("bbbbbbbbbbbbbbb bbbbbbbbbb bbbbbbbbbbbbb bbbbbbbb",5,5,50,50, -1,-1) GUIctrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT) $Btn_Test = GUICtrlCreateButton("Test", 10, 10, 90, 20) GUISetState(@SW_SHOW, $Child_GUI) $i=10 While 1 $i+=1 $msg=GUIGetMsg() If $msg=$GUI_EVENT_CLOSE Or $msg=$Btn_Exit Then Exit If $msg=$Btn_Test Then MsgBox(0, "Test", "Hit Button on Child Window") WinMove($Child_GUI,"",$i,50) WEnd Note, WS_EX_COMPOSITED needs at least Windows XP. I think. Edited January 27, 2008 by Siao "be smart, drink your wine"
Richard Robertson Posted January 27, 2008 Posted January 27, 2008 Is it even possible to have a layered child window?
jennico Posted January 27, 2008 Author Posted January 27, 2008 (edited) $WS_EX_COMPOSITED - this is it !!! thank you. i hope this does nothing funny to the main gui with other controls ? btw: add a sleep in the main loop to make the effect visible. yesyes. j. Edited January 27, 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
jennico Posted January 27, 2008 Author Posted January 27, 2008 (edited) Is it even possible to have a layered child window?seems so, from now on. thanks to siao !!! Edited January 27, 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
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