Jump to content

exe as child


Recommended Posts

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