_WTitle( ) API Library Routine

Puts the null-terminated title of the window wh in title.

void _WTitle(WHANDLE wh, char FAR *title)
WHANDLE wh;            /* Window handle. */
char FAR *title;            /* Window title. */

Example

The following example creates and shows a window with both a title and a footer. _WTitle( ) retrieves the title text, which is then displayed on the screen.

Visual FoxPro Code

SET LIBRARY TO WTITLE  

C Code

#include <pro_ext.h>

FAR Example(ParamBlk FAR *parm)
{
   WHANDLE wh;
   char FAR *buffer;

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

   _WSetTitle(wh, "This is a window title");

   _WShow(wh);

   if ((buffer = _Alloca(128)) == 0)
   {
      _Error(182); // "Insufficient memory"
   }
   _WTitle(wh, buffer);

   _PutStr("\nThe window title is \"");
   _PutStr(buffer);
   _PutChr('"');
}
FoxInfo myFoxInfo[] = {
   {"ONLOAD", (FPFI) Example, CALLONLOAD, ""},
};
FoxTable _FoxTable = {
   (FoxTable FAR *) 0, sizeof(myFoxInfo)/sizeof(FoxInfo), myFoxInfo
};

See Also

_WSetTitle( ) API Library Routine | _PutStr( ) API Library Routine | _WShow( ) API Library Routine