Zookeeper
MFC message ing mechanism:
In each class that can receive and process messages, define a ing table between messages and message processing functions, that is, the message ing table. MFC has a window handle ing table with the c ++ Object Pointer. When the window receives a message, the first parameter of the message specifies the window handle associated with the message, find the C ++ Object Pointer through the ing table, and pass the pointer to the base class of the window class of the application framework. The base class calls the windowproc function (in wincore. CPP file). This is a virtual function. The function calls the onwndmsg function internally. Message Processing is completed in this function, and this function is also in wincore. CPP. The onwndmsg function first checks whether there is a message Response Function in the window class. First, check the declare_message_map () macro in the header file of the subclass and whether there is a declaration of the prototype of the message response function between the two afx_msg comment macros; then, in the subclass source file, check whether there is a message ing macro between in_message_map and end_message_map (). Find the message Response Function and process the message. If not, then it is handed over to the base class for processing.
MFC message ing mechanism