_InKey( ) API Library Routine Example

The following example calls _InKey( ) from Visual FoxPro with two flags.

Visual FoxPro Code

SET LIBRARY TO INKEY
#define SHOWCURSOR   1
#define HIDECURSOR   2
#define MOUSEACTIVE 4
= XINKEY(0, SHOWCURSOR + MOUSEACTIVE)

C Code

#include <pro_ext.h>

FAR Example(ParamBlk FAR *parm)
{
   _RetInt(_InKey((int) parm->p[0].val.ev_long,
      (int) parm->p[1].val.ev_long), 10);
}

FoxInfo myFoxInfo[] = {
   {"XINKEY", (FPFI) Example, 2, "I,I"},
};
FoxTable _FoxTable = {
   (FoxTable FAR *) 0, sizeof(myFoxInfo)/sizeof(FoxInfo), myFoxInfo
};