_WMove( ) API Library Routine Example

The following example moves the frontmost window diagonally 10 rows down and 10 columns to the right.

Visual FoxPro Code

SET LIBRARY TO WMOVE 
=WMOVE()

C Code

#include <pro_ext.h>

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

   newPos.v = _WTop(wh)  + 10;
   newPos.h = _WLeft(wh) + 10;

   _WMove(wh, newPos);
}

FoxInfo myFoxInfo[] = {
   {"WMOVE", (FPFI) WMoveEx, 0, ""},
};
FoxTable _FoxTable = {
   (FoxTable FAR *) 0, sizeof(myFoxInfo)/sizeof(FoxInfo), myFoxInfo
};