In the documentation for Microsoft, it states PeekMessageW dispatch the message if any.
But why in this case is there the need of a DispatchMessageW function ? The few example I could gather use both together, calling DispatchMessage after PeekMessage/GetMessage.
I also can observe experimentally that peekMessage does not dispatch the message but seems to only give a look at the message queue.