Menu Bar

#### Search Results

Search

# Menu Bar

This document covers the following topics:

- Description

- Attributes for Menu Bar

- Events

## Description

A menu bar is displayed at the top of the dialog window. It is the top level of a menu structure and contains menu items (second level). A menu item may be of type submenu. Then it is a submenu control which may be pulled down; it contains menu items (third level). The number of levels is unlimited.

A menu bar only becomes visible in a dialog when the attribute MENU-HANDLE is set to a value for the dialog. The PARENT of a menu bar may be a dialog or a NULL-HANDLE. If a dialog is the PARENT, the menu structure is specific to the dialog and is deleted when the dialog is deleted. If a NULL-HANDLE is the PARENT, the menu structure is free and will be closed when the application is closed. A free menu structure can be shared among several dialogs when the handles are defined in a global data area rather than in a local data area.

For an MDI child window, the menu bar is displayed only at the top of the MDI frame window, not in the MDI child window. The MDI children all share one menu bar, which is displayed in the MDI frame window. Every time another MDI child window is activated, the menu bar changes to reflect the menu bar defined for the particular MDI child window.

Note
You may create only one menu bar per dialog. By default, the dialog editor generates a menu bar named "#DLG-MENU-BAR", the parent being the dialog window.

## Attributes for Menu Bar

Attribute Name | Query | Set/Modify | In Attr. Window
--- | --- | --- | ---
CLIENT-DATA | X | X/X |
CLIENT-HANDLE | X | X/X |
CLIENT-KEY | X | X/X |
CLIENT-VALUE | X | X/X |
FIRST-CHILD | X | -/- |
HELP-ID | X | X/X | X
LAST-CHILD | X | -/- |
PARENT | X | X/- |
PREDECESSOR | X | -/- |
SUCCESSOR | X | -/- |
TYPE | X | X/- |
VISIBLE | X | X/X |

## Events

This dialog element does not create events.

### On this page

- Description
- Attributes for Menu Bar
- Events