_WSizeP( ) API Library Routine 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
};