Menu Methods

The methods described in this section are for creating dialog menus.

CreateMenu

>>-aUserDialog~CreateMenu(--+-------+--)-----------------------><
                            +-count-+


This method initializes the creation of a menu. When you have finished adding menu items, call SetMenu to combine the menu with the dialog.

Arguments:

There is only one argument:

count

Maximum number of menu items that can be added

AddPopupMenu

>>-aUserDialog~AddPopupMenu(--name--,--"--options--"--)--------><


This method adds a popup menu to the menu.

The last popup menu must have the option "END" specified.

Arguments:

The arguments are:

name

The name of the popup menu

options

GRAYED DISABLED END

AddMenuItem

>>-aUserDialog~AddMenuItem(--name--,--id--,--"--options--"--,--msgToRaise--)-><


This method adds a new menu item after the last added item.

The last menu item in a popup menu must have the option "END" specified.

Arguments:

The arguments are:

name

The name of the menu item. The name can include &.

id

The ID of the menu item

options

GRAYED DISABLED END CHECKED

msgToRaise

Method to be called when the menu item is selected. See ConnectMenuItem.

AddMenuSeparator

>>-aUserDialog~AddMenuSeparator--------------------------------><


This method adds a menu separator to the menu after the last added item.

SetMenu

>>-aUserDialog~SetMenu-----------------------------------------><


This method adds the menu that was created or loaded for the current dialog to the dialog window. Note that the menu needs additional space and therefore displaces the rest of the dialog items.

LoadMenu

>>-aUserDialog~LoadMenu(--resfile--,--menuid-------------------->

>--+-------------------------------------+--)------------------><
   +-,--+----------------+--+----------+-+
        +-"CONNECTITEMS"-+  +-,--count-+


This method loads a menu resource out of a resource script.

To combine the menu with the dialog, you must call SetMenu.

Arguments:

The arguments are:

resfile

The name of a resource script.

menuid

The ID of the menu resource.

CONNECTITEMS

The menu items are automatically connected to methods named after the name of the menu item. See LoadItems for further details.

count

The maximum number of menu items that can be loaded.