_WZoom( ) API Library Routine Example

The following example creates and displays a window. It then calls _WZoom( ) for this window with each possible parameter.

Visual FoxPro Code

SET LIBRARY TO WZOOM 

C Code

#include <pro_ext.h>

FAR Example(ParamBlk FAR *parm)
{
   WHANDLE wh;
   int row, col;

   wh = _WOpen(2,2,20,70,WEVENT | CLOSE,WINDOW_SCHEME,(Scheme FAR *) 0,
      WO_SYSTEMBORDER);

   _WShow(wh);

   _Execute("WAIT WINDOW 'Press any key to minimize window'");
   _WZoom(wh, WZ_MINIMIZED);

   _Execute("WAIT WINDOW 'Press any key to normalize window'");
   _WZoom(wh, WZ_NORMAL);

   _Execute("WAIT WINDOW 'Press any key to maximize window'");
   _WZoom(wh, WZ_MAXIMIZED);

   _Execute("WAIT WINDOW 'Press any key to normalize window'");
   _WZoom(wh, WZ_NORMAL);
}

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