What is a Menu?

A menu is a list of items which, to the user, are the application's commands. A menu item can be displayed using text or a bitmap. The user tells the application to perform a command by selecting a menu item using the mouse or the keyboard. When a user chooses a menu item, Windows sends the application a message that indicates which item the user selected.

If you use QuickCase:W, it creates the menu script file for you. If you do not use QuickCase:W, then follow these general steps to use a menu in your application:

1.Define the menu in your resource script file.

2.Specify the menu in your application code. There are two common ways to do this:

When registering the window class, specify a menu for that entire window class (the “class menu”).

When creating a window, specify a menu for that window.

3.Initialize the menu, if necessary.

Once the menu exists and has been initialized, the following can take place:

The user can select commands from the menu.

When the user selects a command (menu item), Windows sends your application an input message that includes the identifier for that menu item.

Your application can add, change or replace menu items, or even the entire menu, as necessary.