Re: Machile level exception
- Posted by CChris Jan 21, 2009
- 1099 views
You cannot clear the keyboard buffer, because there may be none. If there is one, Windows certainly has total control over it, and won't let you tamper it.
Your application gets a message whenever it has focus and a keyboard event occurs. If you wish to buffer that yourself, you can, of course. If what you need is simply to record whether a window is visible or not, so as to toggle its state, then simply query the visibility of the window using isVisible(), so that you don't even need to remember anything.
CChris