SUMMARY

In this chapter you’ve seen two ways of creating an elementary Windows application with Visual C++. You should now have a feel for the relationship between these two approaches. In subsequent chapters you’ll be exploring in more depth how you develop applications using the MFC.

WHAT YOU LEARNED IN THIS CHAPTER
TOPIC CONCEPT
Windows API The Windows API provides a standard programming interface by which a desktop application communicates with the Windows operating system.
Windows messages Windows communicates with a desktop application by passing messages to it. A message typically indicates that an event of some kind has occurred that requires action on the part of the application.
Windows application structure All Windows desktop applications must include two functions, WinMain() and WindowProc(), that will be called by the operating system. You can use any name you like for the WindowProc() function.
The WinMain() function The WinMain() function is called by the operating system to begin execution of an application. The function includes code to set up the initial conditions required by the application, to specify the application window, and to retrieve messages from the operating system that are intended for the application.
The WindowProc() function The Windows operating system calls a particular function that is usually called WindowProc() to process messages. A desktop application identifies the message processing function for each application window ...

Get Ivor Horton's Beginning Visual C++ 2012 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.