Current location - Recipe Complete Network - Complete cookbook - In MFC, how to respond to menu commands in custom classes?
In MFC, how to respond to menu commands in custom classes?
Under MFC, the menu commands are all corresponding to the main window or sub-window (this is subordinate), so you must do the response function under the main window or sub-window. Of course, you can call the sub-defined class in the response function, or send a message to the custom class to control the sub-defined class.

It is recommended to use ClassWizard above menu items in resources to create menu response functions.