Command Line

Command DLGMENU

Function:

Add an item to a dialog box's menu bar.
Syntax:
DLGMENU type dlg_id ["string" [id [proc]]]
typeSpecifies the type of item to add to the menu and may be one of the following names :-

POPUPA pop up menu item which is displayed along the menu bar.
ITEMAn item that belongs to a pop up menu.
SEPARATORA horizontal line the belongs to a pop up menu.

dlg_idSpecifies the identifier of a dialog box that owns the menu.
"string"A sequence of characters that specifies the text to be displayed by the item.
idSpecifies a unique identifier for the menu item.
procSpecifies the name of the procedure to call to handle the items events.
Note:
  • Parameters id and proc are not used when the POPUP item type is specified.
  • Parameters "string", id and proc are not used when the SEPARATOR item type is specified.
  • Dialog box menu's are built using several DLGMENU commands. A menu must begin with a POPUP item type and each pop up menu must contain at least one ITEM or SEPARATOR item type. For example, to add a menu bar containing a File and Help pop up menu to a dialog box whose identifier is 1000, the following DLGMENU commands are required :-

    DLGMENU popup 1000 "&File"
    DLGMENU item 1000 "&Open" 101 open
    DLGMENU item 1000 "&Open" 101 open
    DLGMENU separator 1000
    DLGMENU item 1000 "E&xit" 103 exit
    DLGMENU popup 1000 "&Help"
    DLGMENU item 1000 "&About" 104 about
  • Menus must be added to a dialog box before the dialog box is displayed with the DLGSHOW command.
  • Also see command GREY, ISGREYED, TICK and ISTICKED.

Copyright © 1995-2005 Lucien Cinc, All Rights Reserved
WinOne is an Australian registered trademark of Lucien Cinc