PWB Extensions Help (ext.hlp) (Table of Contents; Topic list)
IdAddPwbMenuItem
                                             Up Contents Index Back
─────PWB Extensions─────────────────────────────────────────────────────────
 
  Syntax:  WORD IdAddPwbMenuItem( unsigned Flags,
                                  unsigned idMenu, unsigned idBefore,
                                  char far *Name, char far *Help,
                                  char far *Topic, char far *Command );
 
  Returns: ID for the new menu item; 0 if item could not be added.
 
  See:     CheckPwbMenuItem, EnablePwbMenuItem, IdAddPwbMenuItem,
           IdFindPwbMenuItem, RecordPwbMenuItem, SetPwbMenuItemTitle,
           SetPwbMenuItemCommand
 
     The IdAddPwbMenuItem function adds a new command to the PWB menus.
     For an example, see the DISKMENU.C sample extension.
 
     To get the menu IDs for <idMenu> and <idBefore>, use the
     IdFindPwbMenuItem function.
 
     Argument      Description
 
     <Flags>       Set of bit flags that specify attributes of the menu
                   item. Combine the following constants by using the
                   bitwise-OR operator (|):
 
                   Constant        Attribute
 
                   TM_CHECKED      Item has a bullet
                   TM_UNCHECKED    Item has no bullet (default)
                   TM_ENABLED      Item is available (default)
                   TM_DISABLED     Item is unavailable
                   TM_RECORD       Item can be recorded (default)
                   TM_NORECORD     Item cannot be recorded
                   TM_COMMAND      Item has a command
                   TM_SUBMENU      Item is a cascaded menu
                   TM_SEPARATOR    Item is a separator bar
 
     <idMenu>      ID of menu to add to; 0 for menu bar.
 
     <idBefore>    ID of item to insert before; 0 for end of menu.
 
     <Name>        Item title. Precede the highlighted access character
                   with a tilde. NULL if TM_SEPARATOR specified.
 
     <Help>        String that appears on the status bar when the item
                   is selected. NULL if TM_SEPARATOR specified.
 
     <Topic>       Help topic string for the item. NULL if TM_SEPARATOR
                   specified.
 
     <Command>     Name of function or macro to execute when the item is
                   chosen. NULL if TM_COMMAND not specified.
 
     Note that the command is always executed as a macro. This means
     that all message boxes produced by DoMessageBoxHelp and
     DoMessageBox assume the default response and are not displayed.
 
     To restore these dialog boxes, the menu command must be a macro
     that uses the macro prompt directive (<). An extension can define
     macros using fExecute.
     See: DoMessageBox, DoMessageBoxHelp, fExecute
          PWB Macro Prompt Directives
                                    -♦-