title: Windows - Removing keyboard-related messages from message queue
body: <p>I need to remove all keyboard-related messages from the message queue of a thread. After some researches i managed to write the following code :</p>
  
  <pre><code>for( MSG zMsg; PeekMessage( &amp; zMsg, NULL, WM_KEYFIRST, WM_KEYLAST, PM_REMOVE ); );
  </code></pre>
  
  <p>But it doesn't seem to work.</p>
  
  <p>I don't know if this is a good practice or not but i don't have the possibility and the time to rewrite the code i'm working on to make it cleaner.</p>
  
  <p>How could i get this code to work please ?</p>
  
  <p>Thanks for your help !</p>
  
  <p>EDIT : I'm using WindowsCE</p>