Tobolobo

Parent & Child

Jul 13th, 2012
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.87 KB | None | 0 0
  1. #include <GUIConstants.au3>
  2. #include <WindowsConstants.au3>
  3. #include <WinAPI.au3>
  4.  
  5. $Form1 = GUICreate("Hallo", 100, 100, 0, 0)
  6. GUISetState(@SW_SHOW)
  7.  
  8. $Form2 = GUICreate("ich", 100, 100, 100, 100, -1, -1, $Form1)
  9. GUISetState(@SW_SHOW)
  10.  
  11. $Form3 = GUICreate("bin Tobi", 100, 100, 200, 200, -1, -1, $Form2)
  12. GUISetState(@SW_SHOW)
  13.  
  14. If _WinAPI_GetParent($Form3) = $Form2 Then
  15.     ConsoleWrite("3 = Child von 2" & @CRLF)
  16. EndIf
  17. If _WinAPI_GetParent($Form3) = $Form1 Then
  18.     ConsoleWrite("3 = Child von 1" & @CRLF)
  19. EndIf
  20. If _WinAPI_GetParent($Form2) = $Form1 Then
  21.     ConsoleWrite("2 = Child von 1" & @CRLF)
  22. EndIf
  23. If _WinAPI_GetParent($Form2) = $Form3 Then
  24.     ConsoleWrite("2 = Child von 3" & @CRLF)
  25. EndIf
  26. If _WinAPI_GetParent($Form1) = $Form2 Then
  27.     ConsoleWrite("1 = Child von 2" & @CRLF)
  28. EndIf
  29. If _WinAPI_GetParent($Form1) = $Form3 Then
  30.     ConsoleWrite("1 = Child von 3" & @CRLF)
  31. EndIf
Advertisement
Add Comment
Please, Sign In to add comment