Links are not active on this page.
 _WZoom( ) API Library Routine

Minimizes or maximizes the specified window, or returns it to normal.

void _WZoom(WHANDLE wh, int newstate)
WHANDLE wh;            /* Window handle. */
int newstate;                  /* State of window after zoom. */

Expand imageRemarks

You can specify the newstate parameter as WZ_MINIMIZE, WZ_NORMAL, or WZ_MAXIMIZE, which are defined in the PRO_EXT.H file.

For more information on how to create an API library and integrate it with Visual FoxPro, see Accessing the Visual FoxPro API.

Expand imageExample

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

Visual FoxPro Code

 CopyCode imageCopy Code
SET LIBRARY TO WZOOM 

C Code

 CopyCode imageCopy 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
};

Expand imageSee Also