I plan to embed an unmanaged C++ OpenGL viewer in WPF. The requirements are (apart from robustness and ease of development)
- proper resizing
- context menu for the OpenGL viewer area (only for viewer related actions)
- events (e.g. triggered by selection of an object in the OpenGL viewer)
- WPF dialogs should be drawn on top of the OpenGL space
So far I've found some blogs and discussions about using a hosted WinForm control (via C++/CLI wrapper), but it seems to be bit tricky (even a bit tinkery) to get all my above requirements done (if possible).
How about creating an ActiveX control? Despite having no experience with creating an ActiveX control, one advantage would already be that it runs in its own process.
Is it a good idea or would I run into even more tinkering?
EDIT: I should be clearer about the OpenGL viewer. It's an existing app based on an C++ 3D engine which only supports OpenGL. Porting to an DirectX capable engine is considered as last resort.