EventReceiver, Flag for Mouse-Moving
Posted: Fri Sep 08, 2006 1:13 pm
Hi,
in my app I need to now if the mouse is moving or not, so I have a global flag "g_mousemoving".
In the OnMove() of the EventReceiver I set this flag to "true", if the event occurs.
But where should I set the flag to "false"? The OnMove() is not called when the mouse stops moving, so I tried several possibilities: at the beginning of my mainloop (where the moving and rendering is done), at the end of my mainloop... but nothing worked and I am just guessing. What I need to know is: when and how is the EventReceiver working? Is it running in an extra thread? Or is it called at specific times in the loop? I think that I have to set my flag to false exactly before the EventReceiver gets called, but I don't know when this happens.
Bye
Riky
in my app I need to now if the mouse is moving or not, so I have a global flag "g_mousemoving".
In the OnMove() of the EventReceiver I set this flag to "true", if the event occurs.
But where should I set the flag to "false"? The OnMove() is not called when the mouse stops moving, so I tried several possibilities: at the beginning of my mainloop (where the moving and rendering is done), at the end of my mainloop... but nothing worked and I am just guessing. What I need to know is: when and how is the EventReceiver working? Is it running in an extra thread? Or is it called at specific times in the loop? I think that I have to set my flag to false exactly before the EventReceiver gets called, but I don't know when this happens.
Bye
Riky