_WShow( ) API Library Routine Example

The following example contains two API routines. WINOPEN( ) opens a window but doesn't call _WShow( ), illustrating that the window is hidden until _WShow( ) displays it on the screen.

Visual FoxPro Code

SET LIBRARY TO WSHOW 
wh = WOPEN()
= WSHOW(wh)

C Code

#include <pro_ext.h>

FAR WOpen(ParamBlk FAR *parm)
{
   _RetInt(_WOpen(2, 2, 20, 70, WEVENT | CLOSE, WINDOW_SCHEME,
      (Scheme FAR *) 0, WO_SYSTEMBORDER), 10);
}

FAR WShow(ParamBlk FAR *parm)
{
   _WShow(parm->p[0].val.ev_long);
}

FoxInfo myFoxInfo[] = {
   {"WOPEN", (FPFI) WOpen, 0, ""},
   {"WSHOW", (FPFI) WShow, 1, "I"},
};
FoxTable _FoxTable = {
   (FoxTable FAR *) 0, sizeof(myFoxInfo)/sizeof(FoxInfo), myFoxInfo
};