今回も特別に教えてやろう。エラーがでたらエラーの理由を調べなきゃダメだぞ。中学生。 https://msdn.microsoft.com/ja-jp/library/windows/desktop/ms644944(v=vs.85).aspx | To get extended error information, call GetLastError. GetLastError returns ERROR_NOT_ENOUGH_QUOTA when the limit is hit. と書いてあり、さらに | There is a limit of 10,000 posted messages per message queue. | This limit should be sufficiently large. If your application exceeds the | limit, it should be redesigned to avoid consuming so many system resources. | To adjust this limit, modify the following registry key. と書かれている。
PostMessageがFAILするヘボアプリなんか書いたことが無いので、試しにCreateWindow直後に while (PostMessage(hWnd, WM_NULL, 0, 0)) ; するプログラムを書いてみると、ERROR_NOT_ENOUGH_QUOTAが発生する事が確認できる。