### Creating Menus

To create the menus, select the Menu button in the Tools window. A message box will be displayed indicating that no menus exist for the window. It also asks you if you want to select menus from the standard menus. Clicking the Yes push button displays Standard Menus dialog box.

This dialog box contains eight notebook pages, with each notebook page signifying different action-bar menus. By selecting the check box for the action-bar item, you indicate that you wish to include that item in the action bar. The menu items that are generally associated with that action-bar item will then become selectable. You can then select those that apply to the window you are creating.

For this window, you will only want to include the File action-bar item and none of the standard menu items. To do this, select the File tab of the notebook and then click on the File action bar menu check box. You will notice that the submenu items associated with the File action-bar menu will become selectable. It is impossible to have submenu items with no action-bar items.

Next, click on the Create push button, thereby creating the action-bar menu item. The Menu Styles dialog box is displayed. You will see in the list boxes the File action-bar item you selected in the Standard Menus dialog box. To add a formal ID symbol, select the item in the top list box and in the ID field type IDM_FILE.

Click on the Change push button to cause the item to be updated. This will cause the item to be added to the list boxes. After doing this, you could then enter a new item or change the current one. An asterisk (*) will be displayed to the left of the text denoting that the item is an action-bar menu item. It will also be colored dark red, thereby distinguishing it from the regular menu items.

Next, select the Sub-menu item radio button so you can add the first menu item of the File menu. Type ~Example dialog for the menu-item text. Type IDM_EXAMPLE for the ID symbol and 10 for the value.

Because you previously created a dialog box (Example dialog box), you can associate the menu item you are creating with that dialog box. To do this, click on the arrow of the Dialog combination box; the dialog box list to be displayed. Select the DLG_EXAMPLE symbol from it, and the combination-box entry field will be completed for you.

From the Menu styles group, select the Text radio button. Then, click on the File entry in the list box to associate the submenu item you are entering to the action-bar menu. This is done by clicking on the File entry in the list box. This will allow the IRE to correctly place the sub-menu into the correct action-bar menu. When more than more action-bar menu has been defined, this simplifies the process unnecessary to arrange menus later. Now click on the Add push button to add it to the submenu list.

For the next menu item, select the Separator style and type -1 into the Value entry field. This time, you will not have to associate the separator to the File menu because it is already selected. Only when the submenu item that you are creating has a different parent do you need to select the parent menu item in the list box.

The final menu item to be added to the File menu is the exit command. The exit-command text should be E~xit\tF3, and you type it in the Text entry field. You will notice that an accelerator is being associated with the menu item and will be automatically added to the accelerator table for you.

The ID symbol and value for the menu item should be IDM_EXIT and 11. Associate the menu item with the File menu, select the Text style from the Menu styles group, click on the Add push button, and then click on the Save push button to exit and save the menu information. This will also cause the menu items to be placed in the window you are designing. You can see this by clicking on the File menu item in the window you are designing.

Designing and Building Applications
Creating Application Windows
Saving and Generating The Resource Script Files