Gee Posted October 4, 2008 Share Posted October 4, 2008 hi , all I need GUI example : Child GUI insize Parent GUI and Child gui can not move out parent gui thank ! Link to comment Share on other sites More sharing options...
Andreik Posted October 4, 2008 Share Posted October 4, 2008 hi , all 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 More sharing options...
rasim Posted October 4, 2008 Share Posted October 4, 2008 AndreikGood example, but why need the GUIRegisterMsg(0xF, "WM_PAINT")? Seem work fine without OnPaint message registration Link to comment Share on other sites More sharing options...
Gee Posted October 4, 2008 Author Share Posted October 4, 2008 Thank Andreik very good Example Link to comment Share on other sites More sharing options...
Andreik Posted October 4, 2008 Share Posted October 4, 2008 AndreikGood example, but why need the GUIRegisterMsg(0xF, "WM_PAINT")? Seem work fine without OnPaint message registration Now notice that can run without OnPaint. When the words fail... music speaks. Link to comment Share on other sites More sharing options...
jennico Posted November 7, 2008 Share Posted November 7, 2008 (edited) well,it does not need the includes either ! btw: never use sleep in a messageloop. edit2 : what is this good for: WinMove("CHILD", '', -4, -30, 485, 206) works fine without Edited November 7, 2008 by jennico Spoiler I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.Don't forget this IP: 213.251.145.96 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