_WSize( ) API Library Routine
Sets new dimensions of the specified window to the height and width specified by h and v in the pt parameter.
void _WSize(WHANDLE wh, Point pt)
WHANDLE wh; /* Window handle. */
Point pt; /* Position. */
Example
The following example creates a window, and then expands its width and height.
Visual FoxPro Code
SET LIBRARY TO WSIZE
C Code
#include <pro_ext.h>
FAR WSizeEx(ParamBlk FAR *parm)
{
WHANDLE wh;
Point dim;
wh = _WOpen(2,2,10,10,CLOSE | WEVENT,WINDOW_SCHEME,(Scheme FAR *)0,
WO_SYSTEMBORDER);
_WShow(wh);
dim.v = 8;
// Grow in width
for (dim.h = 8; dim.h < 60; dim.h += 4)
{
_WSize(wh, dim);
_Execute("WAIT WINDOW 'Press Any Key To Change Size'");
}
// Grow in height
for (dim.v = 8; dim.v < 20; dim.v += 2)
{
_WSize(wh, dim);
_Execute("WAIT WINDOW 'Press Any Key To Change Size'");
}
}
FoxInfo myFoxInfo[] = {
{"ONLOAD", (FPFI) WSizeEx, CALLONLOAD, ""},
};
FoxTable _FoxTable = {
(FoxTable FAR *) 0, sizeof(myFoxInfo)/sizeof(FoxInfo), myFoxInfo
};
See Also
Reference
_WSizeP( ) API Library Routine
_Execute( ) API Library Routine