Xand3r Posted March 27, 2009 Share Posted March 27, 2009 (edited) #include<WinApi.au3> $MG=GUICreate('Main',1024,768,-1,-1) GUISetState() $CG=GUICreate('Child',200,400,100,100) GUISetState() _WinAPI_SetParent($CG,$MG) While GUIGetMsg()<>-3 WEndoÝ÷ ÚØ^{¦¦W°¢¹vÚ[£î¶ïËZÜ(mrZ,zØ^jb*.rXíç%¢ÇºÛhíêZéíwÚrÛaz«z{gz÷«ëwöÇèrëwbëaz·¢±§!WpwhÂ)⵩ò×jÇ×èºwm槳«jëh×6#include<WinApi.au3> #include<WindowsConstants.au3> $MG=GUICreate('Main',1024,768,-1,-1) GUISetState() $CG=GUICreate('Child',200,400,100,100,BitOR($WS_MINIMIZEBOX, $WS_CAPTION, $WS_CHILD, $WS_SYSMENU,$WS_OVERLAPPEDWINDOW),$WS_EX_TOOLWINDOW,$MG) GUISetState() _WinAPI_SetParent($CG,$MG) While GUIGetMsg()<>-3 WEnd combining the $WS_CHILD with the $WS_CAPTION seemed to do the work Edited March 28, 2009 by TheMadman Only two things are infinite, the universe and human stupidity, and i'm not sure about the former -Alber EinsteinPractice makes perfect! but nobody's perfect so why practice at all?http://forum.ambrozie.ro Link to comment Share on other sites More sharing options...
TerarinK Posted March 27, 2009 Share Posted March 27, 2009 The child window has to be set as a child window, this can be done out the GUICreate function as well by looking at GUISetStyle. If you read about it on the MSDN page if you look in the help file under _WINAPI_SetParent 0x576520616C6C206469652C206C697665206C69666520617320696620796F75207765726520696E20746865206C617374207365636F6E642E Link to comment Share on other sites More sharing options...
Xand3r Posted March 27, 2009 Author Share Posted March 27, 2009 i tried it with child windows too.... same problem the parent window can't get focus unless it has no child windows or if all child windows are minimized Only two things are infinite, the universe and human stupidity, and i'm not sure about the former -Alber EinsteinPractice makes perfect! but nobody's perfect so why practice at all?http://forum.ambrozie.ro Link to comment Share on other sites More sharing options...
KaFu Posted March 27, 2009 Share Posted March 27, 2009 (edited) Your first example didn't work for me on XP either... ;#include<WinApi.au3> $MG=GUICreate('Main',1024,768,-1,-1) GUISetState() $CG=GUICreate('Child',200,400,100,100,Default,Default,$MG) GUISetState() ;_WinAPI_SetParent($CG,$MG) While GUIGetMsg()<>-3 WEnd Edited March 27, 2009 by KaFu 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...
Xand3r Posted March 27, 2009 Author Share Posted March 27, 2009 Your first example didn't work for me on XP either... ;#include<WinApi.au3> $MG=GUICreate('Main',1024,768,-1,-1) GUISetState() $CG=GUICreate('Child',200,400,100,100,Default,Default,$MG) GUISetState() ;_WinAPI_SetParent($CG,$MG) While GUIGetMsg()<>-3 WEnd your example does not make the child go inside the parent window..... Only two things are infinite, the universe and human stupidity, and i'm not sure about the former -Alber EinsteinPractice makes perfect! but nobody's perfect so why practice at all?http://forum.ambrozie.ro 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