Wrecked Games

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're just that awesome.

Author Topic: [Error] creating OIS::Mouse and OIS::Keyboard objects WindowsForms MDI  (Read 505 times)

Denis

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 1
    • View Profile

Hello

I searched for similar topics in this forum, but I didn't find anything.
I use Ogre C++ SDK as Child Window in my WindowsForms(managed) MDI Window. That works well, until i try to use ExampleFrameListener. This Listener use OIS to use input from keyboard and mouse. I get a exception while executing this code:
Code: [Select]
OIS::ParamList pl;
size_t windowHnd = mFormParentHandle;
windowHndStr << mFormParentHandle;
pl.insert(std::make_pair(std::string("WINDOW"), windowHndStr.str()));
mInputManager = OIS::InputManager::createInputSystem( pl );
mMouse = static_cast<OIS::Mouse*>(mInputManager->createInputObject( OIS::OISMouse, bufferedMouse )); //<-----throw exception
mFormParentHandle is a handle of top level window. Unfortunately the last commando throws a exception.:


What do I make wrong? I hope somebody can help me.

With kind regards.
Denis
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2653
    • View Profile
    • http://www.wreckedgames.com
Re: [Error] creating OIS::Mouse and OIS::Keyboard objects WindowsForms MDI
« Reply #1 on: October 03, 2009, 08:04:20 AM »

That error just seems like a generic exception across managed->unmanaged boundary. You should put a try/catch around the initialization code and see what OIS is throwing.
Logged