To handle and process messages, an application can use a message loop and the window procedure. These terms are explained in the following two sections.