Specifies a routine to execute when the user chooses the specified menu and item.
Syntax
void _OnSelection(MENUID menuid, ITEMID itemid, FPFI routine)
MENUID menuid; /* Menu identifier. */
ITEMID itemid; /* Item identifier. */
FPFI routine; /* Routine to execute. */
Remarks
If you specify itemid as – 1, the routine executes when the user chooses any item on the menu. A routine associated with an individual item overrides one associated with the entire menu. To cancel a selection routine for a specified menu and item, pass (FPFI)0 as the routine parameter.
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.