How to empty keybrd queue

How to get rid of keyboard events from the events queue ? I don't want
to have any key pressed when I open a dialog. Tried GetMessage, but it is
not it...

Piotr Wypych
w...@ikp.atm.com.pl