JavaScript Editor js editor     Web development 

Main Page

Returns the text of a specified menu item. If the menu item contains an access key definition, the ampersand character is returned as well.

void _GetOSPrompt(MENUID menuid, ITEMID itemid, char FAR *text)
MENUID menuid;            /* ID of menu from which to get prompt */
MENUID itemuid ;            /* Index (0-based) of menu item. */
char FAR *text;               /* Text of menu command. */


Can be used for developing applications with language-independent access keys.

For more information on how to create an API library and integrate it with Visual FoxPro, see Accessing the Visual FoxPro API.


The following example returns the text of the first command on the File menu.

Visual FoxPro Code

В Copy Code

C Code

В Copy Code
#include <pro_ext.h>

void FAR menuprompt(ParamBlk FAR *parm)
   char prompt[256] ;
   MenuId men ;
   men = _MenuId(_FILE);
   _GetOSPrompt(men, 0, prompt); //File New...

FoxInfo myFoxInfo[] = {
   {"MENUPROMPT", (FPFI) menuprompt, 0, ""}

FoxTable _FoxTable = {
   (FoxTable FAR *) 0, sizeof(myFoxInfo)/sizeof(FoxInfo), myFoxInfo

See Also

JavaScript Editor js editor     Web development