How do I render to my own HWND from the Player?

Hi, Just concentrating on Windows at the moment - I’m playing with the FWindowsWindow and GameViewportClient code and I want to specify my own HWND as the parent of the player window, or better yet I would like to just pass in my own HWND to render to. Does anyone know how I could go about this? I’ve added a new EWindowMode::Type for it but I’m having trouble finding where to insert/pass in my HWND.

Thanks.

Just in case you still want an answer 5 months later - see WindowsApplication::MakeWindow() and InitializeWindow(). I’m not exactly sure how you’d render to your own, but the CreateWindowEx call is in FWindowsWindow::Initialize(), so maybe you could overload that.

Thanks for that. I did get it working from FWindowsWindow::Initialize.

A note for anyone else wanting to do this, it is much easier to just use a child window attached to your window. You need to create a normal window first like the code in that routine (with no parent) then ::SetParent() it to the window you are wanting to attach it to.

The mouse cursor may need a little work if you do this though (depending on your window structure - I had one UE window embedded into an ActiveX component showing in another program which needed it), FWindowsCursor::GetPosition() needs to adjust for the parent window menu/ribbon etc.