There are three main categories:
1、Command message:
This includes WM_COMMAND notification messages from user-interface objects: menus, toolbar buttons, and accelerator keys.(digested from msdn)
for example:
Add click event handler to menuitem about, the MFC generate automatically three lines code( macro definition: ON_COMMAND(ID_HELP_ABOUT, OnAbout) in .cpp file , event handle function: void CCapturePacketDlg::OnAbout() in .cpp file, and event handle function's declaration: void OnAbout() in .h file), the macro ON_COMMAND(ID_HELP_ABOUT, OnAbout) depresent: { WM_COMMAND, CN_COMMAND, (WORD)id, (WORD)id, AfxSigCmd_v, static_cast<AFX_PMSG> (memberFxn) }, among therm, WM_COMMAND is message id, and is also Command message.
2、Windows messages
This includes primarily those messages beginning with the WM_ prefix, except for WM_COMMAND. Windows messages are handled by windows and views. These messages often have parameters that are used in determining how to handle the message.(digested by msdn)
for example:
Add event handle function OnHotkey() witch responds to Alt + F5 to show or hide the main window. I don't kown how use MFC to add the event code automatically, so i add code into three places( macro definition: ON_MESSAGE(WM_HOTKEY, OnHotkey) in .cpp file , event handle function: LRESULT CCapturePacketDlg::OnHotkey(WPARAM wp,LPARAM lp) in .cpp file, and event handle function's declaration: LRESULT OnHotkey(WPARAM wp,LPARAM lp) in .h file). But how does the application responde to Alt + F5? we must register the hot key, so i can call API RegisterHotKey in my dialog class's OnInitDialog function.
3、Control notifications
Sorry, so far, i have used it.