Jump to content

I need example Parent GUI and Child GUI


Gee
 Share

Recommended Posts

hi , all :P

I need GUI example : Child GUI insize Parent GUI and Child gui can not move out parent gui

thank !

#include <GUIConstants.au3>
#include <Constants.au3>

$PARENT = GUICreate("PARENT",500,500,10,10,0x16C00000)
GUISetState (@SW_SHOW,$PARENT)
GUIRegisterMsg(0xF,"WM_PAINT")

$CHILD = GUICreate("CHILD",200,200,100,100)
DllCall("user32.dll", "hwnd", "SetParent", "hwnd",$CHILD, "hwnd",$PARENT)
WinMove("CHILD", '', -4, -30, 485, 206)
GUISetState(@SW_SHOW,$CHILD)

While 1
    $MSG = GUIGetMsg()
    If $MSG = -3 Then
        Exit
    EndIf
    Sleep(20)
WEnd

Func WM_PAINT($hWnd, $Msg, $wParam, $lParam)
    Sleep(100)
    DllCall("user32.dll", "int", "InvalidateRect", "hwnd", $hWnd, "ptr", 0, "int", 0)
EndFunc ;==>WM_PAINT

When the words fail... music speaks.

Link to comment
Share on other sites

  • 1 month later...

well,it does not need the includes either ! :mellow::(

btw: never use sleep in a messageloop. :)

edit2 : what is this good for:

WinMove("CHILD", '', -4, -30, 485, 206)

works fine without

Edited by jennico
Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

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...