After some optional processing, it will call DispatchMessage(), which dispatches the message to the relevant handler, also known as WindowProc. Normally, messages that have no special WindowProc() are dispatched to DefWindowProc, the default one.
The sequence of events involves optional preprocessing, followed by the invocation of DispatchMessage(), which transmits the message to the appropriate handler, referred to as WindowProc. Typically, messages without a designated handler are directed to DefWindowProc, the standard approach.