MOIS issue on MDI child form

dumpbyte

15-12-2011 15:44:41

Hi all guys

I'm using Mogre in a MDI app, rendering on MDI child window.
When I start rendering, app crash (interop exception) while creating MOIS keyboard at this line:


myMOISKeyboard = (MOIS.Keyboard)myMOISInputManager.CreateInputObject(MOIS.Type.OISKeyboard, true);


I supect that the issue is related to the MDI child window handle given to MOIS. May be MOIS is getting the MDI parent handle?

I use this to create MOIS system:


MOIS.ParamList pl = new MOIS.ParamList();

// provides MDI child window handler
pl.Insert("WINDOW", myM3DEngine.RenderManager.TargetRenderWindow.Handle.ToString());

pl.Insert("w32_mouse", "DISCL_FOREGROUND");
pl.Insert("w32_mouse", "DISCL_NONEXCLUSIVE");

myMOISInputManager = MOIS.InputManager.CreateInputSystem(pl);


This issue is not present when I start rendering on a single (non MDI) window.
There is any entry in Mogre log about any error, it just end after loading resources.

Anyone know how to solve this?

Thanks in advance.

dumpbyte

15-12-2011 16:39:21

Sorry guys.... it's solved:


You can provide MDI child window handle for rendering, but for MOIS, you must provide MDI parent form handle, and this seems to work ok :D


Regards