Problem with OIS and windows form


04-06-2007 01:11:03

Hi all !

I have a strange problem.

I render my OgreApplication in a System::Windows::Forms::Panel.

When i try to create a OIS::Keyboard* program throw an error :\

I use this code to set OIS:

ParamList pl;
size_t hnd;
std::ostringstream hndString;
hndString << (size_t)hnd;
this->mInputManager = OIS::InputManager::createInputSystem(pl);

And here become the error :

mKey = static_cast<Keyboard*>(input->createInputObject(OISKeyboard,true));


06-06-2007 23:11:51

Make sure you are passing your top window form, not the panel handle. As, DirectInput (what OIS uses) requires that.