I gave Esenthel a long time ago. I just wrote the code to test the integration in wpf.
what do you mean by drawing multiple renders on a win32 window?
If i remember that correctly, Esenthel works on its own thread (using StartEEManually) and we use setParent to change its parent's window to our HwndHost (
http://msdn.microsoft.com/fr-fr/library/...dhost.aspx )
Now, Esenthel is a simple control like any other and you can use the power of WPF for your interface.
Note that you need to check the problem of airspace issue (
http://msdn.microsoft.com/en-us/library/aa970688.aspx ).
I give you the source but i have removed my version of Esenthel so i can't re-test this app now.
But the source are very simple, please, follow this path :
1----------------------------------------------------------------------------
PROJECT: WpfApplication1
Method : MainWindow.xaml.cs/MainWindow_Loaded
Find Win32 HINstance and call _engine.Init(....)
2-----------------------------------------------------------------------------
PROJECT: NetDCCore.Client.D3DEngine
Method :D3DEngine.cpp/D3DEngine::Init
call StartEEManually((Ptr)dll_module_instance);
This is an Esenthel init function which runs the InitPre/Init and shut functions
3-----------------------------------------------------------------------------
PROJECT: NetDCCore.Client.D3DEngine
Method :Engine.cpp/Init
call TransFormToChild( App.hwnd(),mHwndMain);
which encaspluate the main EE window in the given child window which is a WPF HWndHost.
void TransFormToChild(void *Ptr,void *Parent)
{
HWND hWnd = (HWND) Ptr;
HWND hWndParent = (HWND) Parent;
SetWindowLong(hWnd,GWL_EXSTYLE,WS_EX_LEFT|WS_EX_NOPARENTNOTIFY);
SetWindowLong(hWnd,GWL_STYLE,WS_CHILD|WS_VISIBLE);
SetParent(hWnd,hWndParent);
//SetWindowPos(hWnd,HWND_TOP,0,0,640,480,SWP_SHOWWINDOW);
}
End.
-----------------------------------------------------
Hope this help you.
Note: this source is for testing purpose only.