Uten Posted May 23, 2006 Share Posted May 23, 2006 I have been playing with a WindowInWindow sample @Holger posted a while back.But when I add a GroupBox to my main window it does not behave as expected. Anyone know how to make it draw correctly? Any style combination to make it all work?expandcollapse popup;RESOURCE: @Holger: http://www.autoitscript.com/forum/index.php?showtopic=19605&hl=GetWindowThreadProcessId #include <GUIConstants.au3> Opt("GUIResizeMode",$GUI_DOCKALL) $hGUI = GUICreate("Test", 800, 600, -1, -1, BitOr($WS_MINIMIZEBOX, $WS_CAPTION, $WS_SIZEBOX, $WS_SYSMENU, $WS_CLIPCHILDREN)) Global $ctlNavigate = GUICtrlCreateGroup("Test", 5, 0, 90, 200) Global $btnPlay = GUICtrlCreateButton("Play", 10, 20, 40, 25) GUICtrlCreateGroup("", -99, -99, 1, 1) EmbedApp(@WindowsDir & "\notepad.exe") GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Switch $msg case $GUI_EVENT_CLOSE ExitLoop Case $GUI_EVENT_MINIMIZE ConsoleWrite ("$GUI_EVENT_MINIMIZE" & @LF) Case $GUI_EVENT_MAXIMIZE ConsoleWrite ("$GUI_EVENT_MINIMIZE" & @LF) Case $GUI_EVENT_RESTORE ConsoleWrite ("$GUI_EVENT_MINIMIZE" & @LF) Case $GUI_EVENT_RESIZED ConsoleWrite ("$GUI_EVENT_MINIMIZE" & @LF) EndSwitch WEnd Exit Func EmbedApp($appPathName) $PID = Run($appPathName, "", @SW_HIDE) $hWnd = 0 $stPID = DllStructCreate("int") Do $WinList = WinList() For $i = 1 To $WinList[0][0] If $WinList[$i][0] <> "" Then DllCall("user32.dll", "int", "GetWindowThreadProcessId", "hwnd", $WinList[$i][1], "ptr", DllStructGetPtr($stPID)) If DllStructGetData($stPID, 1) = $PID Then $hWnd = $WinList[$i][1] ExitLoop EndIf EndIf Next Sleep(100) Until $hWnd <> 0 $stPID = 0 If $hWnd <> 0 Then $nExStyle = DllCall("user32.dll", "int", "GetWindowLong", "hwnd", $hWnd, "int", -20) $nExStyle = $nExStyle[0] DllCall("user32.dll", "int", "SetWindowLong", "hwnd", $hWnd, "int", -20, "int", BitOr($nExStyle, $WS_EX_MDICHILD)) DllCall("user32.dll", "int", "SetParent", "hwnd", $hWnd, "hwnd", $hGUI) WinSetState($hWnd, "", @SW_SHOW) WinMove($hWnd, "", 100, 0, 600, 400) EndIf EndFunc;==>EmbedApp() Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
Lazycat Posted May 23, 2006 Share Posted May 23, 2006 Try to add WS_EX_TRANSPARENT ex-style to Group. Global $ctlNavigate = GUICtrlCreateGroup("Test", 5, 0, 90, 200, -1, $WS_EX_TRANSPARENT) Koda homepage ([s]Outdated Koda homepage[/s]) (Bug Tracker)My Autoit script page ([s]Outdated mirror[/s]) Link to comment Share on other sites More sharing options...
Uten Posted May 23, 2006 Author Share Posted May 23, 2006 Try to add WS_EX_TRANSPARENT ex-style to Group.Spott on, thanks a million Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling 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