You've understood it correctly. The point that I was trying to make was that there may be more than one window procedure handling the messages of a single window. In that case it is called subclassing and the procedures are called in a list where one calls the other. Sorry if it confused you..
Anyway, after successfully creating a window, there is usually a loop like this:
MSG msg;
while (GetMessage(&msg, NULL, 0, 0) > 0) {
TranslateMessage(&msg);
DispatchMessage(&msg);
}
Step 1 is done by
GetMessage, it retrieves a message from the queue into the msg structure.
In step 2
TranslateMessage deals with simplifying keyboard input management. For example, normally when you press a key you get a "key down" and a "key up" message. TranslateMessage sees these messages and produces a new message with simply the key that was pressed.
And as you said,
DispatchMessage sends messages to the window procedure associated with the window.
Don't hesitate to ask if something still isn't clear! :)