tags:

views:

274

answers:

1

We may use the following code to clear keyboard buffer:

while PeekMessage(Msg, 0, WM_KEYFIRST, WM_KEYLAST, PM_REMOVE or PM_NOYIELD) do;

But how may I clear mouse click buffer?

+2  A: 

I got it:

while PeekMessage(Msg, 0, WM_MOUSEFIRST, WM_MOUSELAST, PM_REMOVE or PM_NOYIELD) do;
Chau Chee Yang
s/KEY/MOUSE/ - who would have thought **that**? :-)
Ulrich Gerhardt
@Ulrich: +1 for that hilarious comment :D
Smasher

related questions