Share via


_WSizeP( ) API Library Routine

Sets the new dimensions of the window to the height and width specified in pixels by h and v in the pt parameter.

void _WSizeP(WHANDLE wh, Point pt)
WHANDLE wh;            /* Window handle. */
Point pt;                     /* Position. */

Remarks

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 creates a window, and expands its width and then its height.

Visual FoxPro Code

SET LIBRARY TO WSIZEP  

C Code

#include <pro_ext.h>

FAR WSizeEx(ParamBlk FAR *parm)
{
   WHANDLE wh;
   Point dim;

   wh = _WOpenP(6,6,20,20,CLOSE | WEVENT,WINDOW_SCHEME,(Scheme FAR *)0,
      WO_SYSTEMBORDER);
   _WShow(wh);

   dim.v = 14;

//   Grow in width
   for (dim.h = 14; dim.h < 480; dim.h += 40)
   {
      _WSizeP(wh, dim);
      _Execute("WAIT");
   }

//   Grow in height
   for (dim.v = 14; dim.v < 240; dim.v += 40)
   {
      _WSizeP(wh, dim);
      _Execute("WAIT WINDOW 'Press Any Key To Change Window Size'");
   }
}

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

See Also

_WBottomP( ) API Library Routine | _WLeftP( ) API Library Routine | _WRightP( ) API Library Routine | _WTopP( ) API Library Routine | _WSize( ) API Library Routine