Original Post
Hi,
I have been facing a few problems reagrding Direct Input lately, but I was able to solve them on my own accord (GOOD for me
) ... but I still want to know what I was doing wrong there, here are the problems:
1. When I try to Initialize KeyBoard (in Direct Input) it can either be for a FOREGROUND Window or a BACKGROUND Window ... the problem is that it doesn''t initialize through FOREGROUND, however, BACKGROUND works for me. Have anyone faced this sort of problem yet?
But the app I am building is Windowed ... so if exiting the app is through ESC Key and it is pressed in another window, then the app will quit. I used the Active status of the Window to acquire and unacquire the Input Device to prevent the application from recieving Input if it is not Active. That solved my problem ... but why cant I initialize the Device by setting it to a FOREGROUND Window? Is there any extra stuff required?
2. When getting coordinates of the Mouse through Direct Input, it gives the movement of the Mouse Device ... not the movement or position of the cursor on the screen! Why is that? Is that useful? (I think in FPS Games)
I used the Window Function GetCursorPos() to get the the current cursor position on the screen and that solved the problem. But isnt there anything for that in Direct Input?
3. I will be using Direct3D to set a cursor image for the Cursor of the app (Windowed) (in two or three days), will that effect the GetCursorPos() function for the Window or not?
Thanks!
Hope I explained my problems right :!