To invoke a menu or dialog box, use the MENUFILE command. If you know the name of your menu, at the command line, type
menufile("menuname.men")
If DADiSP cannot find a menu file, try specifying the sub-directory in which the menu file is located. For example:
menufile("myfolder\menuname.men")
explicitly searches the myfolder directory for the menuname.men menu file.
If the menu file name does not include a sub-directory, DADiSP automatically searches a number of paths to locate the menu. An excellent location for a custom menu is a sub-directory of the Modules directory. For example, by creating a menu named menu1.men in the Modules\MyModule folder, the command:
menufile("menu1.men")
automatically locates menu1.men because DADiSP automatically searches all sub-directories of the Modules directory to locate menus, SPL functions, macros and other supporting files.
Many built-in menus are invoked with the _mf system macro that explicitly searches the .\menus folder and is not recommended for user define menus and dialog boxes. The _menuf system macro is similar to _mf but performs a general search that is appropriate for user defined menus and dialog boxes. The _menuf macro also sets the _dwin macro that can be used to initialize the target window. Examples of using _menuf and _dwin will be presented later in the chapter.