Novative
March 6th, 2006, 07:02 AM
Hey out there ! :)
I am currently writing a little MFC application with a 3D preview (child-) window. While the OpenGL-Code, I use runs smoothly, I am having trouble setting up a DirectInput device for my keyboard. Every time I try to set the cooperative level of the input device I get an error stating "E_HANDLE", which -at least to me- seems to indicate that my window handle is invalid.
I tried setting the window handle to my applications (top)window, but not even this helped.
When I write a standalone application without MFC, the same input code works fine.
Am I missing something obvious here ? Checked error codes on every call before and they seem to work properly up to that point.
BTW. : I am new to DirectInput :S
Thanks in advance for any ideas/suggestions,
Novative
I am currently writing a little MFC application with a 3D preview (child-) window. While the OpenGL-Code, I use runs smoothly, I am having trouble setting up a DirectInput device for my keyboard. Every time I try to set the cooperative level of the input device I get an error stating "E_HANDLE", which -at least to me- seems to indicate that my window handle is invalid.
I tried setting the window handle to my applications (top)window, but not even this helped.
When I write a standalone application without MFC, the same input code works fine.
Am I missing something obvious here ? Checked error codes on every call before and they seem to work properly up to that point.
BTW. : I am new to DirectInput :S
Thanks in advance for any ideas/suggestions,
Novative