<p>How many messages does the queue for a standard window hold? What happens when the queue overflows?</p>

<p>The documentation for <code>GetMessage</code> and relatives doesn't say anything about this, and <code>PeekMessage</code> only gives you a yes/no for certain classes of messages, not a message count.</p>

<p><a href="http://msdn.microsoft.com/en-us/library/aa925082.aspx" rel="noreferrer">This page</a> says that the queues are implemented using memory-mapped files, and that there is no message count limit, but that page is about WinCE. Does this apply to desktop Win32 as well?</p>

10000 by default, but it can be adjusted via the registry.
If queue overflows, PostMessage fails.
Documentation here:
```
PostMessage
```
function on MSDN