How render scene to external Windows window?

hi, every one, i have a great question.

I edit a scene in editor. Then i write a win32 program with VS, and i want integrate with UE. That means i want render the 3d scene to my program window!
I don’t known if i can do it !

I am sorry for my litter english.

Why? No body?

This can definitely be done with importing win32 specific functions into C# that allow you to capture a window. After you’ve done that you could craft a workspace similiar to ConsoleWorkspace that will allow you to render the results. Hooking back up input support to control the mouse pointer will require a little work, but is doable, too, also with win32 calls. I hope that points you in the right direction.

Yes nobody… =) I have tried searching for the same information, two weeks to no avail!
Btw, probably what you can do is

  1. Create SceneCapture2d and have the texture be drawn to a window (WM_PAINT event for an example). It shouldn’t be too hard though I have not done it.
  2. Resize your main UE4 window to 1x1 pixel window. You can probably hide it altogether.
  3. As it is practically two applications (one is UE4 and another is the win32), you should try to send UE4 texture to win32 application by IPC mean (Interprocess Communications - Win32 apps | Microsoft Docs)

I’ve recently written a win32 app in c++/haxe that runs Unreal Engine in a hidden process and using Scenecapture2D and Spout to share the texture to my program, displaying it together with other ui elements. Works great and there is very little hit on performance!