_NewMenu( ) API Library Routine

See Also   Example

Creates a new menu of the specified menu type.

Syntax

int _NewMenu(int mtype, MENUID menuid)
int mtype;                  /* Menu type. */
MENUID menuid;            /* Menu identifier. */

Remarks

You can specify MPOPUP or MBAR as the mtype parameter. The menu identifier must be unique.

Use _GetNewMenuId( ) to obtain an available menu id. _NewMenu( ) returns 0 if it succeeds in creating a new menu. If it's unsuccessful, _NewMenu( ) returns a negative integer whose absolute value is a Visual FoxPro error number.

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.