Using Menu Files

Menu files define the appearance of menus and the actions they perform. The items in each section of the menu file contain AutoCAD LT command strings and macro syntax that define the resulting action when the menu item is chosen.

Menu files define

Menu File Types

The term menu file actually refers to the group of files that work together to define and control the appearance and functionality of the menu areas. The following table describes the AutoCAD LT menu file types.

File type Description
MNU Template menu file.
MNC Compiled menu file. This binary file contains the command strings and menu syntax that define the functionality and appearance of the menu.
MNR Menu resource file. This binary file contains the bitmaps used by the menu.
MNS Source menu file (generated by AutoCAD LT).

Bitmap Resource DLLs

You can use bitmap resource DLLs to store the bitmaps used for toolbars and for pull-down and cursor menus: the DLL file name must be the same as the menu file name it's associated with; the resources must be named, not index numbered; and the DLL file must be located in the same directory as the menu file that uses it.

To use these resources in the menu, use the appropriate resource names in the id_small and id_big parameters for toolbar buttons.

Menu-Specific Help

To access the online system-level Help (Windows Help files), you use the menu tag as an index to an associated help file.

Help on Menu Items

If the user activates the system-level Help for a menu item by pressing F1 while the menu item is highlighted, the help engine is called with two arguments. The arguments are the file name of the original menu (or the menu group name it supplied) and the menu tag, as shown in the next section. For example, the menu item with the name tag ID_Cancel would call the help engine with a value of ID_Cancel and a help file of sample.hlp.

Status-Line Help Strings

The status-line help messages are simple descriptive messages that appear on the status line when a menu item is chosen. The Help strings menu section provides support for this form of help.

*** MENUGROUP=sample

***POP1

ID_Title[/TTitle]

ID_Cancel[Cancel Command]^C^C

ID_Line[/LLine]^C^C_line

***HELPSTRINGS

ID_Title[This is the Title menu]

ID_Cancel[This item cancels the previous command]

ID_Line[This draws a simple line]

The syntax for the Help strings section is a name tag followed by a label. When a menu item is selected, the name tag for that item is queried for a corresponding entry in the Help strings section. If such a match occurs, the string contained within the label is displayed on the status line.

Loading and Unloading Menu Files
Menu File Structure