Menu IDs

Each menu item has a unique identifier, usually called a “menu ID.” When the user chooses a command, Windows passes the command's menu ID to the application. Menu IDs must be unique constants. You can define each menu ID as a constant by using the #define directive in the resource script file or the include file. For example:

#define IDM_EXIT 111

#define IDM_RECALC 112

#define IDM_SCYLLA 113

#define IDM_CHARYBDIS 114

You use a menu ID to direct the flow of control depending on which menu item the user selects. For more information on processing menu input, see topic .