Adds an item with the specified identifier itemid to the menu specified by menuid.
Syntax
int _NewItem(MENUID menuid, ITEMID itemid, ITEMID beforeid, char FAR *prompt)
MENUID menuid; /* Menu identifier. */
ITEMID itemid; /* New item identifier. */
ITEMID beforeid; /* Identifier of item the new item precedes. */
char FAR *prompt; /* Text for new menu item. */
Remarks
The type of the new menu item is automatically a menu title or a bar, depending on the type of menu into which the item is being inserted.
The beforeid parameter specifies the identifier of the item the new item is to precede. Specify beforeid as – 1 to specify the new item will be the first item in the list, or as -2 to specify the item is to be added at the end of the list. The prompt specifies the text for the new menu item. _NewItem( ) returns 0 if it succeeds in adding an item, or – 1 if not.
For more information on how to create an API library and integrate it with Visual FoxPro, see Chapter 28, Accessing the Visual FoxPro API, in the Programmer's Guide.