Share via


_DefaultProcess( ) API Library Routine

Provides the default event processing for an event returned by _GetNextEvent( ) when the event does not need special handling.

void _DefaultProcess(EventRec FAR *event)
EventRec FAR *event;      /* Event to be processed. */

Remarks

This makes it easier for an external routine to use windows and still have them act consistently with the rest of the product.

Note   Don't call _DefaultProcess( ) from an event handler.

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

Example

The following example is a loop consisting of a call to _GetNextEvent( ) followed by a call to _DefaultProcess( ). All events during this procedure receive their default processing.

Visual FoxPro Code

SET LIBRARY TO DEFAPROC

C Code

#include <pro_ext.h>

FAR Example(ParamBlk FAR *parm)
{
   EventRec ev;
   int i;

   for (i = 0; i < 16; i++) 
{
      _GetNextEvent(&ev);
      _DefaultProcess(&ev);
   }
}

FoxInfo myFoxInfo[] = {
   {"ONLOAD", Example, CALLONLOAD, ""},
};
FoxTable _FoxTable = {
   (FoxTable FAR *) 0, sizeof(myFoxInfo)/sizeof(FoxInfo), myFoxInfo
};

See Also

_FindWindow( ) API Library Routine | _GetNextEvent( ) API Library Routine | _GlobalToLocal( ) API Library Routine | Events in Visual FoxPro | Accessing the Visual FoxPro API