RE: [GD-Windows] Input thread
Brought to you by:
vexxed72
From: Ivan-Assen I. <as...@ha...> - 2003-06-06 12:14:50
|
> If you use windows messages for mouse stuff, it's also a good > idea to capture the mouse when you receive a mouse down. In a > full screen app the mouse is always over the window, but if > you support windowed mode (you do, right? Debugging), you > could receive a BUTTONDOWN but not the corresponding BUTTONUP > because the mouse has moved outside the window (the window is > still in focus). Also remember that SetCapture() and > ReleaseCapture() are not refcounted, so multiple simultaneous > button presses need special care. Also remember that in multimon configuration your application might have stretched itself to the entire primary screen, but still the mouse can be able to escape to other monitors... we had such a problem with Celtic Kings. (Sadly, this didn't convince management to install a second monitor on every programmer's desk :-) I also second the DirectInput suggestion. If you want to access the keyboard as an assortment of buttons (vs. a text-input device), the DirectInput API is very straightforward. regards, Assen |