Sign in to follow this  
Followers 0
sergeyWolf

several child gui

2 posts in this topic

main idea : script launch several GUIs. if we close child window - it will close, if we close main GUI window - will close main window + all other GUIs (windows)

i tried to play with it by "@SW_SHOW\@SW_HIDE" but can't understand how to make it work properly :) my current file

#include <GuiConstants.au3>
#include <WindowsConstants.au3>
Local $GUI_main 
Local $main_action

Local $GUI_log
Local $log_action

Local $GUI_edit
Local $edit_action

$GUI_main           = GUICreate ("Main", "300", "300", -1, -1)
$bt_open_log        = GUICtrlCreateButton ("New window", 10, 10, 100, 50)
GUISetState (@SW_SHOW)

$GUI_log            = GUICreate ("Log", "200", "200", -1, -1)
$bt_hide_log        = GUICtrlCreateButton ("hide", 10, 10, 100, 50)
GUISetState (@SW_SHOW)

$GUI_edit           = GUICreate ("Edit", "200", "200", -1, -1)
$bt_hide_edit       = GUICtrlCreateButton ("hide", 10, 10, 100, 50)
GUISetState (@SW_SHOW)

While 1
    $main_action = GUIGetMsg()
    $log_action = GUIGetMsg ()
    $edit_action = GUIGetMsg ()
    
    Select
        Case $main_action = $GUI_EVENT_CLOSE        
            ExitLoop
            
        Case $log_action = $GUI_EVENT_CLOSE
            GUISetState (@SW_HIDE, $GUI_log)
        
        Case $edit_action = $GUI_EVENT_CLOSE
            GUISetState (@SW_HIDE, $GUI_edit)
            
    EndSelect
        
WEnd

- I want program that crack all other programs...- Let's split up, i'll search this program and you'll find crack for it. ^_^'

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

You are not useing GuiGetMsg very well look at this wiki link and read it all Managing Multiple GUIs

Edited by monoscout999

Share this post


Link to post
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
Sign in to follow this  
Followers 0