独自のウィンドウの1つを別のプロセスが所有するウィンドウにアタッチする必要があるアプリケーションをC#で作成しています。Windows APIからSetParent関数を使用してみましたが、機能しないようです。これを行う方法はありますか?
[DllImport("user32.dll", SetLastError = true)]
private static extern int SetParent(int hWndChild, int hWndNewParent);
private void AttachWindow(int newParent) {
SetParent(this.Handle, newParent);
}