_GetNewItemId( ) API Library Routine

See Also   Example

Returns an identifier that's currently available for use as an item identifier in the specified menu.

Syntax

ITEMID _GetNewItemId(MENUID menuid)
MENUID menuid;            /* Menu identifier. */

Remarks

Every item in a menu must have an identifier that's unique to that menu.

After using _GetNewItemId( ), add the new item to the menu with _NewItem( ) before using _GetNewItemId( ) again. If you don't add the item to the menu, subsequent calls to _GetNewItemId( ) return the same ITEMID.

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.