Widget sets must have a particular look and feel. The widgets found in various toolkits are pretty much the same, just subtle cosmetic differences. Beneath the toolkit, the event mechanism of the underlying window system is still the same. However, instead of callback procedures or code inside of WindowProc s, the framework calls special class member funtions, called handlers , when a message is received. Programmers must code these handler routines in order for the widgets in their application to respond to events.
Some classes already provide a virtual function for certain messages.
This method is part of the class tt CWnd. You do not necessarily need to add the handler since one is already provided by the base class.