Original Post
I know C++ but I'm new to .NET. I'm writing a game editor for an existing engine I have in C++; I'd like to use WinForms since they are much simpler for me than MFC. What I'd like to do is have my existing C++ code run in a WinForm window. I'm having trouble with creating the D3D device. I know how to create a device both in manage and unmanaged code. The problem is how to I get a window of my existing C++ to show in the WinForms? Basically I would need to pass a HWND from the WinForms to my C++ code, or pass the Device from the WinForms to the C++ code and change it to a LPDIRECT3DDEVICE9. Can anyone show me an example? Is this possible? Some Ideas I like not to resort to if possible: 1. Rewrite the C++ code in C#. 1. Port the C++ code to Managed C++. 3. Have a WinForm window and a DirectX window (2 different windows).