I ran into an odd situation. I posted hundreds of custom messages to my main window, and when handling these messages the rare situation can occur where I pop up an error dialog. At any rate, during a test this error occurred quite often and my screen was filled with message boxes. Being modal, I was surprised by this since the parent's execution is stopped at that call to MessageBox (or "DoModal()") until the message box is closed. I expected an unending series of error dialogs but not simultaneous ones.

Then it occurred to me that when a message box is displayed the parent must still be handling certain messages, if this wasn't the case then it wouldn't be able to repaint itself if the message box was moved. But the parent's message map thread has effectively been halted.

So what happens? Does the modal dialog force explicitly instruct its parent to handle certain messages while it's active?

I did a few searches and couldn't find the answer to this online.