_WMoveP( ) API Library Routine Example

The following example moves the frontmost window diagonally 40 pixels down and 40 pixels to the right.

Visual FoxPro Code

SET LIBRARY TO WMOVEP 
=WMOVEP()

C Code

#include <pro_ext.h>

void FAR WMovePEx(ParamBlk FAR *parm)
{
   WHANDLE wh = _WOnTop();
   Point newPos;

   newPos.v = _WTopP(wh)  + 40;
   newPos.h = _WLeftP(wh) + 40;

   _WMoveP(wh, newPos);
}

FoxInfo myFoxInfo[] = {
   {"WMOVEP", WMovePEx, 0, ""},
};
FoxTable _FoxTable = {
   (FoxTable FAR *) 0, sizeof(myFoxInfo)/sizeof(FoxInfo), myFoxInfo
};