How would I force my program to look if there are any
messages waiting in the queue and if any, proccess them. Something like DoEvents in VisualBasic or Application.processMessages in Delphi.
I.e. I have this loop I want to stop when user clicks the stop button. Now, no messages are handled while the loop is