You can find the wrox.com code downloads for this chapter on the Download Code tab at www.wrox.com/go/beginningvisualc. The code is in the Chapter 13 download and individually named according to the names throughout the chapter.
Windows communicates with your program by sending messages to it. Most of the drudgery of message handling is taken care of in an MFC application, so you don’t have to worry about providing a
WndProc() function. The MFC enables you to provide functions to handle the individual messages that you’re interested in and to ignore the rest. These functions are referred to as message handlers or just handlers. In an MFC-based program, a message handler is always a member of one of your application’s classes.
The association between a particular message and a function in your program that is to service it is established by a message map, and each class in your program that handles Windows messages will have one. A message map is a table of member functions that handle messages bounded by a couple of macros. The start of a message map is indicated ...