Share via


_WMove( ) API Library Routine

Moves the specified window to the new location specified by pt.

void _WMove(WHANDLE wh, Point pt)
WHANDLE wh;            /* Window handle. */
Point pt;                     /* New location. */

Remarks

The pt parameter specifies the position of the upper-left corner of the window in rows and columns. The new position can place the window partially or completely off the screen.

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 moves the active 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
};

See Also

Reference

_WSize( ) API Library Routine

_WMoveP( ) API Library Routine

_MemMove( ) API Library Routine

MOVE WINDOW Command

Other Resources

API Library Construction

Accessing the Visual FoxPro API