For a test, I got only one thread to send out a postmessage(..) every 10 seconds with the same message. In the message routine I simply displayed a dialog box. The dialog boxes kept being displayed, before I pressed the ok button to end the message routine. I was expecting to wait until the dialog box appear, then the next one would appear etc.. Why is this?
Jason's answer is right, let me elaborate.
The dialog box you pop up continues to pull messages off of the thread's message queue and route them, which means in 10 seconds your message hits the queue and ends up popping up another dialog box.
Instead of popping up a dialog, update a control in your GUI to indicate the message was received and what time, then sleep for 15 seconds and return. You'll notice the messages seem to get handled every 15 seconds even though they are posted every 10.
_______________________________________________ msvc mailing list [email protected] See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for subscription changes, and list archive.
