OIS device in C# Forms

A place for Ogre users to discuss non-Ogre subjects with friends from the community.
pizzazhang
Kobold
Posts: 30
Joined: Thu Jan 20, 2011 6:37 am
Location: Shanghai/China

OIS device in C# Forms

Post 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
You do not have the required permissions to view the files attached to this post.
pizzazhang
Kobold
Posts: 30
Joined: Thu Jan 20, 2011 6:37 am
Location: Shanghai/China

Re: OIS device in C# Forms

Post 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.