Page 1 of 1

OIS device in C# Forms

Posted: Mon Sep 26, 2011 2:44 am
by pizzazhang
Hi, community,
I'm now making a game editor using C# Forms and I already wrapped my c++ code to c#. I'm using Weifenluo DockContent as the external window handle to ogre. Now the problem is, if I remove the OIS thing it worked ok, but with OIS device created, after some debug issue, I find in DockContent the OIS mouse and keyboard can't be created, but in normal Form it's ok. So any solution to solve this problem? should I use OIS in DockContent?
Any idea about this topic is aprreciated! :D

the picture without OIS created, it works ok:
Capture.PNG

Re: OIS device in C# Forms

Posted: Mon Sep 26, 2011 3:36 am
by pizzazhang
well, I think I solved this problem. when using ogre renderwindow and ois device in Weifenluo DockContent, I should pass the DockContent's handle to ogre renderwindow and the top level form's handle to OIS, it means if I have the structure: MainWindow->DockPanel->DockContent, then I shuold pass the MainWindow's handle to OIS. BTW, ogre renderwindow should be created after the DockContent has its parent, or the handle of it will be changed.