Creating a Message Loop

The message loop sends and receives messages for your application.

    To create a message loop

The following code example shows how to create a message loop.

   while (GetMessage(&msg, NULL, 0, 0))  
    {
    DispatchMessage(&msg);
    }