_WHide( ) API Library Routine
Removes a window from the screen, but keeps track of its contents so you can display it again.
void _WHide(WHANDLE wh)
WHANDLE wh; /* Window handle. */
Example
The following example hides the window whose title is passed as an argument.
Visual FoxPro Code
SET LIBRARY TO WHIDE
CREATE TABLE X (X C(10))
BROWSE NOWAIT
WAIT WINDOW "Press A Key To Hide Window"
SET LIBR TO WFINDTIT
= WHIDE("X")
WAIT WINDOW "Window Is Hidden"
C Code
#include <pro_ext.h>
void FAR Example(ParamBlk FAR *parm)
{
// For readability---
#define pTITLE ((char FAR *) _HandToPtr(parm->p[0].val.ev_handle))
WHANDLE wh;
if (!_SetHandSize(parm->p[0].val.ev_handle,
parm->p[0].val.ev_length+ 1))
{
_Error(182); // "Insufficient memory"
}
_HLock(parm->p[0].val.ev_handle);
pTITLE[parm->p[0].val.ev_length] = '\0';
wh = _WFindTitle(pTITLE);
_HUnLock(parm->p[0].val.ev_handle);
_WHide(wh);
}
FoxInfo myFoxInfo[] = {
{"WHIDE", (FPFI) Example, 1, "C"},
};
FoxTable _FoxTable = {
(FoxTable FAR *) 0, sizeof(myFoxInfo)/sizeof(FoxInfo), myFoxInfo
};