Jump to content

Multiple GUIS in one big GUI


James
 Share

Recommended Posts

Hey,

I'm making a Basic Algebra System for my maths teacher.

Basically, I want to make 1 bug GUI which will hold multiple smaller GUI's inside. They then can connect with each other. Meaning I can send a formula from a little GUI to another one.

I then want to stop the smaller GUIS from being able to be pulled out of the main gui. So when it gets dragged to an edge the smaller GUI will not go over the big GUI.

Thanks,

Secure

Link to comment
Share on other sites

Search and look for MDI (Multiple Document Interface) solutions in the forum. Before you start I would also do some searching for existing solutions (probably Java or VB based). AutoIt is, in my opinion, not very well suited for this task. But, I would really love for you or some one else to prove me wrong.

Best wishes and happy coding.:whistle:

Link to comment
Share on other sites

Credits.... Holger

#include <GUIConstants.au3>

$hGUI = GUICreate("Test", 800, 600, -1, -1, BitOr($WS_MINIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU, $WS_CLIPCHILDREN))

$PID    = Run(@WindowsDir & "\regedit.exe", "", @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, "", 0, 0, 600, 400)
EndIf

GUISetState()

While 1
    $msg = GUIGetMsg()
    If $msg = -3 Then ExitLoop
WEnd

8)

NEWHeader1.png

Link to comment
Share on other sites

Thanks Val! That works great. I am going to use this now for many of my projects especially my Algebra one :whistle::)

Edit: I'm having a problem adding the following into the script.

Func FormulaGUI()
$FGUI = GUICreate("Formula", 204, 282, 193, 115, -1, BitOR($WS_EX_TOOLWINDOW,$WS_EX_WINDOWEDGE))
$Label1 = GUICtrlCreateLabel("a = ", 8, 8, 22, 17)
$Input1 = GUICtrlCreateInput("", 32, 8, 161, 21)
$Label2 = GUICtrlCreateLabel("b = ", 8, 32, 22, 17)
$Input2 = GUICtrlCreateInput("", 32, 32, 161, 21)
$Label3 = GUICtrlCreateLabel("c = ", 8, 56, 22, 17)
$Input3 = GUICtrlCreateInput("", 32, 56, 161, 21)
$Label4 = GUICtrlCreateLabel("c = ", 8, 80, 22, 17)
$Input4 = GUICtrlCreateInput("", 32, 80, 161, 21)
$Label5 = GUICtrlCreateLabel("d = ", 8, 104, 22, 17)
$Input5 = GUICtrlCreateInput("", 32, 104, 161, 21)
$Label6 = GUICtrlCreateLabel("e = ", 8, 128, 22, 17)
$Input6 = GUICtrlCreateInput("", 32, 128, 161, 21)
$Label7 = GUICtrlCreateLabel("f = ", 8, 152, 19, 17)
$Input7 = GUICtrlCreateInput("", 32, 152, 161, 21)
$Label8 = GUICtrlCreateLabel("g = ", 8, 176, 22, 17)
$Input8 = GUICtrlCreateInput("", 32, 176, 161, 21)
$Label9 = GUICtrlCreateLabel("h = ", 8, 200, 22, 17)
$Input9 = GUICtrlCreateInput("", 32, 200, 161, 21)
$Label10 = GUICtrlCreateLabel("i = ", 8, 224, 18, 17)
$Input10 = GUICtrlCreateInput("", 32, 224, 161, 21)
$Label11 = GUICtrlCreateLabel("j = ", 8, 248, 18, 17)
$Input11 = GUICtrlCreateInput("", 32, 248, 161, 21)
GuiSetState(@SW_SHOW)
EndFunc

I need that to be the window inside.

Edited by Secure_ICT
Link to comment
Share on other sites

#include "GUICONSTANTS.au3"
#include <GuiStatusBar.au3>
#include <GUIConstants.au3>

$hGUI = GUICreate("Basic Algebra - James Brooks", 800, 600, -1, -1, BitOr($WS_MINIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU, $WS_CLIPCHILDREN))
$File = GUICtrlCreateMenu("&File")
$Exit = GUICtrlCreateMenuitem("&Exit", $File) 

$Options = GUICtrlCreateMenu("&Options")
$BColor = GUICtrlCreateMenuitem("&Background Colour", $Options)
; EndMenu

$PID    = FormulaGUI()
$hWnd    = 0
$stPID    = DllStructCreate("int")

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, "", 0, 0, 600, 400)
EndIf

GUISetState()

While 1
    $msg = GUIGetMsg()
    If $msg = -3 Then ExitLoop
WEnd

Func FormulaGUI()
$FGUI = GUICreate("Formula", 204, 282, 193, 115, -1, BitOR($WS_EX_TOOLWINDOW,$WS_EX_WINDOWEDGE))
$Label1 = GUICtrlCreateLabel("a = ", 8, 8, 22, 17)
$Input1 = GUICtrlCreateInput("", 32, 8, 161, 21)
$Label2 = GUICtrlCreateLabel("b = ", 8, 32, 22, 17)
$Input2 = GUICtrlCreateInput("", 32, 32, 161, 21)
$Label3 = GUICtrlCreateLabel("c = ", 8, 56, 22, 17)
$Input3 = GUICtrlCreateInput("", 32, 56, 161, 21)
$Label4 = GUICtrlCreateLabel("c = ", 8, 80, 22, 17)
$Input4 = GUICtrlCreateInput("", 32, 80, 161, 21)
$Label5 = GUICtrlCreateLabel("d = ", 8, 104, 22, 17)
$Input5 = GUICtrlCreateInput("", 32, 104, 161, 21)
$Label6 = GUICtrlCreateLabel("e = ", 8, 128, 22, 17)
$Input6 = GUICtrlCreateInput("", 32, 128, 161, 21)
$Label7 = GUICtrlCreateLabel("f = ", 8, 152, 19, 17)
$Input7 = GUICtrlCreateInput("", 32, 152, 161, 21)
$Label8 = GUICtrlCreateLabel("g = ", 8, 176, 22, 17)
$Input8 = GUICtrlCreateInput("", 32, 176, 161, 21)
$Label9 = GUICtrlCreateLabel("h = ", 8, 200, 22, 17)
$Input9 = GUICtrlCreateInput("", 32, 200, 161, 21)
$Label10 = GUICtrlCreateLabel("i = ", 8, 224, 18, 17)
$Input10 = GUICtrlCreateInput("", 32, 224, 161, 21)
$Label11 = GUICtrlCreateLabel("j = ", 8, 248, 18, 17)
$Input11 = GUICtrlCreateInput("", 32, 248, 161, 21)
GuiSetState(@SW_SHOW)
EndFunc

I don't see why this isn't working? I replaced what the PID is, so why does it not show the main GUI?

Link to comment
Share on other sites

  • 4 weeks later...

I to have tried Holger's script but cannot seem to get it to work with a second GUI call. Works great for calling just about any EXE out there but not AU3 GUI's.

I'll keep watching this thread hoping for a solution. I know there has to be a way to do it but so far I have not found it.

Link to comment
Share on other sites

EDIT: Spent two days searching the forum and wouldn't you know it. as soon as I post something I stumble on a thread that solves it.

Here is what I was able to put together for Secure_ICT's inquiry.

Thanks to Martin for the code example.

#include <GUIConstants.au3>

$hGUI =GUICreate("Basic Algebra - James Brooks", 800, 600, -1)
$File = GUICtrlCreateMenu("&File")
$Exit = GUICtrlCreateMenuitem("&Exit", $File) 
$Options = GUICtrlCreateMenu("&Options")
$BColor = GUICtrlCreateMenuitem("&Background Colour", $Options)

GUISetState(@SW_SHOW)

$FGUI = GUICreate("Formula", 204, 282, 193, 115, -1, BitOR($WS_EX_TOOLWINDOW,$WS_EX_WINDOWEDGE),$WS_OVERLAPPED)
$Label1 = GUICtrlCreateLabel("a = ", 8, 8, 22, 17)
$Input1 = GUICtrlCreateInput("", 32, 8, 161, 21)
$Label2 = GUICtrlCreateLabel("b = ", 8, 32, 22, 17)
$Input2 = GUICtrlCreateInput("", 32, 32, 161, 21)
$Label3 = GUICtrlCreateLabel("c = ", 8, 56, 22, 17)
$Input3 = GUICtrlCreateInput("", 32, 56, 161, 21)
$Label4 = GUICtrlCreateLabel("c = ", 8, 80, 22, 17)
$Input4 = GUICtrlCreateInput("", 32, 80, 161, 21)
$Label5 = GUICtrlCreateLabel("d = ", 8, 104, 22, 17)
$Input5 = GUICtrlCreateInput("", 32, 104, 161, 21)
$Label6 = GUICtrlCreateLabel("e = ", 8, 128, 22, 17)
$Input6 = GUICtrlCreateInput("", 32, 128, 161, 21)
$Label7 = GUICtrlCreateLabel("f = ", 8, 152, 19, 17)
$Input7 = GUICtrlCreateInput("", 32, 152, 161, 21)
$Label8 = GUICtrlCreateLabel("g = ", 8, 176, 22, 17)
$Input8 = GUICtrlCreateInput("", 32, 176, 161, 21)
$Label9 = GUICtrlCreateLabel("h = ", 8, 200, 22, 17)
$Input9 = GUICtrlCreateInput("", 32, 200, 161, 21)
$Label10 = GUICtrlCreateLabel("i = ", 8, 224, 18, 17)
$Input10 = GUICtrlCreateInput("", 32, 224, 161, 21)
$Label11 = GUICtrlCreateLabel("j = ", 8, 248, 18, 17)
$Input11 = GUICtrlCreateInput("", 32, 248, 161, 21)
DllCall("user32.dll", "int", "SetParent", "hwnd", WinGetHandle($FGUI), "hwnd", WinGetHandle($hGUI ))  

GUISetState()


do
    $msg = GUIGetMsg()
    if $msg = $GUI_EVENT_CLOSE Then ExitLoop
    
until 0
Link to comment
Share on other sites

  • 1 month later...

to copy data from one gui to another, i use the WM_COPYDATA message script on the forum

that's just great !

-- Arck System _ Soon -- Ideas make everything

"La critique est facile, l'art est difficile"

Projects :

[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list]
Link to comment
Share on other sites

  • 1 year later...

Hey,

I'm making a Basic Algebra System for my maths teacher.

Basically, I want to make 1 bug GUI which will hold multiple smaller GUI's inside. They then can connect with each other. Meaning I can send a formula from a little GUI to another one.

I then want to stop the smaller GUIS from being able to be pulled out of the main gui. So when it gets dragged to an edge the smaller GUI will not go over the big GUI.

Thanks,

Secure

;I believe you are looking for this muttley

;should be exactly what you are looking for

;you can have as many extra windows as you want

:simply change "Local $MAX = 5" to How MANY Gui's you want

;this was the only way that i found worked properly for what i wanted

;thanx for the original script it really helped

#include <GUIConstants.au3>

$hGUI =GUICreate("Basic Multiple Child Windows - Contained within a parent window", 800, 600, -1)

$File = GUICtrlCreateMenu("&File")

$Exit = GUICtrlCreateMenuitem("&Exit", $File)

$Options = GUICtrlCreateMenu("&Options")

$BColor = GUICtrlCreateMenuitem("&Background Colour", $Options)

GUISetState(@SW_SHOW)

Local $MAX = 5

local $guis[$MAX + 1]

$handles = ""

for $i = 1 to $MAX

$guis[$i] = GUICreate("GUI: " & $i, 150, 100, $i*150, $i*100)

$handles&="GUI: " & $i & ", "

DllCall("user32.dll", "int", "SetParent", "hwnd", WinGetHandle($guis[$i]), "hwnd", WinGetHandle($hGUI ))

MsgBox(0, "New Child", $handles)

GUISetState(@SW_SHOW)

Next

Local $msg = GUIGetMsg(1) ;NOTE: Read the help file on GUIGetMsg

While $msg[0] <> -3

$msg = GUIGetMsg(1)

Switch $msg[0]

case 0

sleep(100)

case -11

case else

ConsoleWrite("Control or event ID:=" & $msg[0] & ", hwnd:=" & $msg[1] & @LF)

EndSwitch

WEnd

;$mGUI7 = GUICreate("7", 204, 125, 193, 115, -1, BitOR($WS_EX_TOOLWINDOW,$WS_EX_WINDOWEDGE),$WS_OVERLAPPED)

;DllCall("user32.dll", "int", "SetParent", "hwnd", WinGetHandle($mGUI7), "hwnd", WinGetHandle($hGUI ))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;

GUISetState()

do

$msg = GUIGetMsg()

if $msg = $GUI_EVENT_CLOSE Then ExitLoop

until 0

Link to comment
Share on other sites

;;and this one has your formula box's

#include <GUIConstants.au3>

$hGUI =GUICreate("Basic Multiple Child Windows - Contained within a parent window", 800, 600, -1)

$File = GUICtrlCreateMenu("&File")

$Exit = GUICtrlCreateMenuitem("&Exit", $File)

$Options = GUICtrlCreateMenu("&Options")

$BColor = GUICtrlCreateMenuitem("&Background Colour", $Options)

GUISetState(@SW_SHOW)

Local $MAX = 5

local $guis[$MAX + 1]

$handles = ""

for $i = 1 to $MAX

$guis[$i] = GUICreate("GUI: " & $i, 204, 282, $i*150, $i*100)

$Label1 = GUICtrlCreateLabel("a = ", 8, 8, 22, 17)

$Input1 = GUICtrlCreateInput("", 32, 8, 161, 21)

$Label2 = GUICtrlCreateLabel("b = ", 8, 32, 22, 17)

$Input2 = GUICtrlCreateInput("", 32, 32, 161, 21)

$Label3 = GUICtrlCreateLabel("c = ", 8, 56, 22, 17)

$Input3 = GUICtrlCreateInput("", 32, 56, 161, 21)

$Label4 = GUICtrlCreateLabel("c = ", 8, 80, 22, 17)

$Input4 = GUICtrlCreateInput("", 32, 80, 161, 21)

$Label5 = GUICtrlCreateLabel("d = ", 8, 104, 22, 17)

$Input5 = GUICtrlCreateInput("", 32, 104, 161, 21)

$Label6 = GUICtrlCreateLabel("e = ", 8, 128, 22, 17)

$Input6 = GUICtrlCreateInput("", 32, 128, 161, 21)

$Label7 = GUICtrlCreateLabel("f = ", 8, 152, 19, 17)

$Input7 = GUICtrlCreateInput("", 32, 152, 161, 21)

$Label8 = GUICtrlCreateLabel("g = ", 8, 176, 22, 17)

$Input8 = GUICtrlCreateInput("", 32, 176, 161, 21)

$Label9 = GUICtrlCreateLabel("h = ", 8, 200, 22, 17)

$Input9 = GUICtrlCreateInput("", 32, 200, 161, 21)

$Label10 = GUICtrlCreateLabel("i = ", 8, 224, 18, 17)

$Input10 = GUICtrlCreateInput("", 32, 224, 161, 21)

$Label11 = GUICtrlCreateLabel("j = ", 8, 248, 18, 17)

$Input11 = GUICtrlCreateInput("", 32, 248, 161, 21)

$handles&="GUI: " & $i & ", "

DllCall("user32.dll", "int", "SetParent", "hwnd", WinGetHandle($guis[$i]), "hwnd", WinGetHandle($hGUI ))

MsgBox(0, "New Child", $handles)

GUISetState(@SW_SHOW)

Next

Local $msg = GUIGetMsg(1) ;NOTE: Read the help file on GUIGetMsg

While $msg[0] <> -3

$msg = GUIGetMsg(1)

Switch $msg[0]

case 0

sleep(100)

case -11

case else

ConsoleWrite("Control or event ID:=" & $msg[0] & ", hwnd:=" & $msg[1] & @LF)

EndSwitch

WEnd

;$mGUI7 = GUICreate("7", 204, 125, 193, 115, -1, BitOR($WS_EX_TOOLWINDOW,$WS_EX_WINDOWEDGE),$WS_OVERLAPPED)

;DllCall("user32.dll", "int", "SetParent", "hwnd", WinGetHandle($mGUI7), "hwnd", WinGetHandle($hGUI ))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;

GUISetState()

do

$msg = GUIGetMsg()

if $msg = $GUI_EVENT_CLOSE Then ExitLoop

until 0

Link to comment
Share on other sites

Yeah... This is old, my maths teacher is enjoying making up new equations and I have made a good bit of money from it :(

ok well just in case muttley

i happen to be using it right now to make a inter-office contact's database and instant messaging gui complete with billing

:)

thanx again

Link to comment
Share on other sites

Thanks anyway!

hey since you finished the script... can you help me with something...

i have already posted the script im using

im having trouble with having buttons on multiple guis at the same time

like i have 5 guis in 1 big gui

and the 5 guils ahve a button on them

how do you tell well any of them are clicked? i can only seem to watch 1 gui at a time

sorry... ive been up all night muttley-~

thanx in advance

Blessedone

Edited by Blessedone
Link to comment
Share on other sites

Ooh, I don't have the script anymore muttley but I can try something for you.

Use arrays to generate the buttons etc, so you could have $Input[10][2] ; Amount of inputs and the gui number

then you can loop through checking to see if it has been clicked.

;np i acctually figured it out... thanx again for your help

#include <GuiConstantsEx.au3>

#include <WindowsConstants.au3>

;Dim $show = 0, $children = 10, $Child_[11];, $Label_1_1, $Label_1_2

HotkeySet("{Esc}", "newwinmsg")

Dim $show = 0, $children = 0, $Child_[$children + 1];, $Label_1_1, $Label_1_2

$Label_1_1 = GUICtrlCreatebutton("", 1, 1, 9000, 9000)

$Label_1_2 = GUICtrlCreatebutton("", 1, 1, 9000, 9000)

$Label_1_3 = GUICtrlCreatebutton("", 1, 1, 9000, 9000)

$Label_1_4 = GUICtrlCreatebutton("", 1, 1, 9000, 9000)

$Label_1_5 = GUICtrlCreatebutton("", 1, 1, 9000, 9000)

$Label_1_6 = GUICtrlCreatebutton("", 1, 1, 9000, 9000)

$Label_1_7 = GUICtrlCreatebutton("", 1, 1, 9000, 9000)

$Label_1_8 = GUICtrlCreatebutton("", 1, 1, 9000, 9000)

$Label_1_9 = GUICtrlCreatebutton("", 1, 1, 9000, 9000)

$Label_1_10 = GUICtrlCreatebutton("", 1, 1, 9000, 9000)

$Main = GuiCreate("MyGUI", 2000, 2000, (@DesktopWidth-516)/2, (@DesktopHeight-323)/2)

;$Button_1 = GuiCtrlCreateButton("&Next >", 335, 290, 80, 25)

;$Button_2 = GuiCtrlCreateButton("< &Back", 250, 290, 80, 25)

;$Button_3 = GuiCtrlCreateButton("&Exit", 420, 290, 80, 25)

;$Button_6 = GuiCtrlCreateButton("", 10, 270, 495, 3, -1, $WS_EX_STATICEDGE)

GuiSetState()

While 1

$msg = GuiGetMsg()

Select

Case $msg = $GUI_EVENT_CLOSE; Or $msg = $Button_3

exit

;ExitLoop

;Case $msg = $Button_1

; Set_Next()

;Case $msg = $Button_2

; Set_Back()

Case $msg = $Label_1_1

If $children > 0 Then

MsgBox(0, "Gui: 1", "you have pressed: 1")

endif

Case $msg = $Label_1_2

If $children > 1 Then

MsgBox(0, "Gui: 2", "you have pressed: 2")

EndIf

Case $msg = $Label_1_3

If $children > 2 Then

MsgBox(0, "Gui: 3", "you have pressed: 3")

EndIf

Case $msg = $Label_1_4

If $children > 3 Then

MsgBox(0, "Gui: 4", "you have pressed: 4")

EndIf

Case $msg = $Label_1_5

If $children > 4 Then

MsgBox(0, "Gui: 5", "you have pressed: 5")

EndIf

Case $msg = $Label_1_6

If $children > 5 Then

MsgBox(0, "Gui: 6", "you have pressed: 6")

EndIf

Case $msg = $Label_1_7

If $children > 6 Then

MsgBox(0, "Gui: 7", "you have pressed: 7")

EndIf

Case $msg = $Label_1_8

If $children > 7 Then

MsgBox(0, "Gui: 8", "you have pressed: 8")

EndIf

Case $msg = $Label_1_9

If $children > 8 Then

MsgBox(0, "Gui: 9", "you have pressed: 9")

EndIf

Case $msg = $Label_1_10

If $children > 9 Then

MsgBox(0, "Gui: 10", "you have pressed: 10")

endif

EndSelect

WEnd

;--------- Functions -------------------

Func Set_Next()

For $x = 1 to $children -1

$Nwin = WinGetState( $child_[$x] )

If $Nwin > 5 Then

;GuiSetState( @SW_HIDE, $child_[$x])

GuiSetState( @SW_SHOW, $child_[$x +1])

Return

EndIf

Next

EndFunc

Func Set_Back()

For $x = $children To 1 Step -1

$Nwin = WinGetState( $child_[$x] )

If $Nwin > 5 Then

; GuiSetState( @SW_HIDE, $child_[$x])

GuiSetState( @SW_SHOW, $child_[$x -1])

Return

EndIf

Next

EndFunc

Func newwinmsg()

dim $childrenold = $children

Dim $children = $childrenold + 1

Dim $Child_[$children + 1]

local $guis[$children + 1]

local $Label_1_[$children + 1]

local $handles = ""

$guis[$children] = GUICreate("GUI: " & $children, 150, 100, $children*150, $children*100)

GuiSetState()

if $children = 1 Then

$Label_1_1 = GUICtrlCreatebutton("TEST ", 8, 8, 50, 20)

EndIf

if $children = 2 Then

$Label_1_2 = GUICtrlCreatebutton("TEST ", 8, 8, 50, 20)

EndIf

if $children = 3 Then

$Label_1_3 = GUICtrlCreatebutton("TEST ", 8, 8, 50, 20)

EndIf

if $children = 4 Then

$Label_1_4 = GUICtrlCreatebutton("TEST ", 8, 8, 50, 20)

EndIf

if $children = 5 Then

$Label_1_5 = GUICtrlCreatebutton("TEST ", 8, 8, 50, 20)

EndIf

if $children = 6 Then

$Label_1_6 = GUICtrlCreatebutton("TEST ", 8, 8, 50, 20)

EndIf

if $children = 7 Then

$Label_1_7 = GUICtrlCreatebutton("TEST ", 8, 8, 50, 20)

EndIf

if $children = 8 Then

$Label_1_8 = GUICtrlCreatebutton("TEST ", 8, 8, 50, 20)

EndIf

if $children = 9 Then

$Label_1_9 = GUICtrlCreatebutton("TEST ", 8, 8, 50, 20)

EndIf

if $children = 10 Then

$Label_1_10 = GUICtrlCreatebutton("TEST ", 8, 8, 50, 20)

EndIf

$handles&="GUI: " & $children & ", "

DllCall("user32.dll", "int", "SetParent", "hwnd", WinGetHandle($guis[$children]), "hwnd", WinGetHandle($Main ))

MsgBox(0, "New Child", $handles)

GUISetState(@SW_SHOW)

Return

EndFunc

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...