The message loop sends and receives messages for your application.
The following code example shows how to create a message loop.
while (GetMessage(&msg, NULL, 0, 0)) { DispatchMessage(&msg); }