VC ++ detailed description of Reading Notes-Chapter 6 menu, vc Reading Notes
1. MFC uses uppercase letters to identify the resource ID.
2. multiple resources are used in the program. When determining its ID number for the resource, in order to clearly distinguish the resource type, this principle is generally followed: add a letter to the end of the "ID" string to identify the resource type. For example, we add a letter "M" after the "ID" character to the menu item ", it indicates that this is a Menu, that is, a Menu resource, a Cursor resource, and its ID number is a "C" after the "ID" string.
3. The MessageBox function of the application framework: AfxMessageBox
Int AfxMessageBox (LPCTSTR lpszText, UINT nType = MB_ OK, UINT nIDHelp = 0 );
4. Windows message Classification
(1) Standard Messages
All messages starting with WM _ are standard messages except WM_COMMAND. SlaveCWndThe derived class can receive such messages.
(2) Command Message
Messages from menus, acceleration keys, or toolbar buttons. Such messages are displayed in the form of WM_COMMAND.In MFC, different command messages are distinguished by the menu item ID. In SDK, The wParam parameter of the message is used to identify messages.. SlaveCsf-targetThe derived class can receive such messages.
(3) Announcement
Messages generated by the control, such as Button clicking and selection of the list box, are generated to notify the event to its parent window (usually a dialog box. Such messages are also presented in the form of WM_COMMAND. Classes derived from csf-target can receive such messages.
5. Because the CWnd class is derived from c1_target,Classes derived from CWnd can receive standard messages, command messages, and notification messages. For Classes derived from csf-target, only command messages and advertised messages can be received, and standard messages cannot be received..
6.