I am having a bit of trouble understanding why the message loop is important. So lets say the user types in A which goes into the message queue. THEN the message loop takes it and then sends it back? This is the part I don't understand. Why does it send it back to windows. Wouldn't it be simpler just to have windows either send it directly to windows procedure OR have message loop send it to the windows procedure?
The message loop blocks execution (duh) so that ProcessMessage() can process the messages of the window. This involves drawing the window or windows and processing other controls. I could if I wanted create GUI system but if I want the window to stay open until it is closed I need some way of continuously drawing it and processing its messages. If there is no message loop the window will only be drawn once and its messages processed once. I think windows has too much to do to worry about processing windows. Besides, you want the window to run in the application's thread, not the systems.
Winprog has a page with just your question.