JavaScript Editor js editor     Web development 



Main Page

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

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

Remarks

The pt parameter specifies the location of the upper-left corner of the window in pixels. 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 40 pixels down and 40 pixels to the right.

Visual FoxPro Code

В Copy Code
SET LIBRARY TO WMOVEP 
=WMOVEP()

C Code

В Copy 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
};

See Also



JavaScript Editor js editor     Web development