A Windows application is any application that is specifically written to run with Windows and that uses the Windows application programming interface (API) to carry out its tasks. A Windows application has the following basic components:
A main function named WinMain
A window function
The WinMain function is the entry point for the application and is similar to the main function used in the standard C environment. It is always named WinMain.
A window function is something new. It is a “callback function” — a function within your application that Windows calls. Your application never calls its window functions directly. Instead, it waits for Windows to call the window function with requests to carry out specific tasks or to return information.