

Handle ) SendMessage ( TWinControl ( _owner ). SetParent ( _puttyhandle, TWinControl ( _owner ). FAppThreadID := GetWindowThreadProcessId ( _puttyhandle, nil ) AttachThreadInput ( GetCurrentThreadId, FAppThreadID, True ) /// Changing parent of the running app to our provided container control Windows. Dock var WindowStyle : Integer FAppThreadID : Cardinal begin WindowStyle := GetWindowLong ( _puttyhandle, GWL_STYLE ) WindowStyle := WindowStyle - WS_CAPTION - WS_BORDER - WS_OVERLAPPED - WS_THICKFRAME SetWindowLong ( _puttyhandle, GWL_STYLE, WindowStyle ) /// Attach container app input thread to the running app input thread, so that the running app receives user input. I docked Putty, but Notepad also works fine 🙂 procedure TSSHConnection. _owner should be a TWinControl, where you want your external application to be docked. _puttyhandle is a THandle, value comes from FindWindow.
