Jump to content

Recommended Posts

Posted (edited)

_WinAPI_SetParent()

Or call SetParent directly from user32.dll

I'll post an example in a minute.

EDIT:

#Include <GUIConstants.au3>
$hGUI = GUICreate("Test")
Run("notepad.exe")
Sleep(500)
$hGUI2 = DllCall("user32.dll", "hwnd", "SetParent", "hwnd", WinGetHandle("Untitled - Notepad"), "hwnd", $hGUI)
GUISetState()
Do
    Sleep(200)
Until GUIGetMsg() = -3

Works, but I always seem to have trouble with the window not wanting to repaint after it's been set as a child, so you might have to mouse over the menu items to find them, and then the Edit box.

Edited by KentonBomb

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
×
×
  • Create New...