|
-
March 6th, 2006, 08:02 AM
#1
MFC window and DirectInput
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
-
March 6th, 2006, 06:07 PM
#2
Re: MFC window and DirectInput
I have always used WM messages to handle the mouse...
Last edited by nolxev; December 1st, 2007 at 12:34 PM.
-
March 7th, 2006, 05:02 PM
#3
Re: MFC window and DirectInput
Hey there ! Thanks for the reply, maybe I really fall back to windows messages, I just have 3rd party code using DI, thus it would have been nice if I could have just used it out of the box ...
I even managed to get DI partly running, unfortunately, it seems to require a toplevel- window-handle to function properly (which means DI takes control over my whole application window) and I have not found a way yet to restrict it to the child window I want to use it in ...
Any further suggestions on the subject welcome 
Novative
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|