Menus are an important part of the consistent user interface that Windows programs offer. Adding a menu to your program is a relatively easy part of Windows programming: You simply define the structure of the menu in your resource script and assign a unique ID number to each menu item. You specify the name of the menu in the window class structure. When the user chooses a menu item, Windows sends your program a WM_COMMAND message containing that ID. But we won't stop with that simple example. One of the more interesting things you can do with menus is display bitmaps in the menu rather than character strings, so we'll take a detailed look at how that is done.
This chapter also covers ”keyboard accelerators.“ These are key combinations that are used primarily to duplicate menu functions.