I tried your code and I it really doesn't work properly. I don't know why, but since I also need the SetParent function, so I've played with it a little bit. The following code seems to work, but I do not think if this is the correct way to do it. I only added the line WinActivate($Form1) after the DLLCall.
#include <GUIConstants.au3>
Run("notepad.exe")
WinWait("Untitled - Notepad")
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("AForm1", 691, 515, 193, 123)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
DLLCall("user32.dll", "str", "SetParent", "hwnd", WinGetHandle("Untitled - Notepad"), "hwnd", WinGetHandle("AForm1"))
WinActivate($Form1)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd