MSDN gives a decent definition of a "message-only window":
A message-only window enables you to send and receive messages. It is not visible, has no z-order, cannot be enumerated, and does not receive broadcast messages. The window simply dispatches messages.
Relevant detail highlighted.
You use them to take advantage of the message dispatch mechanism in your own code. Most typically to get a worker thread to talk to the UI thread in a thread-safe way. A message loop is the universal solution to the producer-consumer problem. Apartment marshaling in COM is implemented with a message-only window for example. Clearly such a window should be hidden and only get the messages that are defined by the app.
Don't use HWND_MESSAGE as hWndParent when calling CreateWindowEx.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…