Condividi tramite


_WPutStr( ) API Library Routine

Displays a null-terminated string at the output position in the specified window and in the current color.

void _WPutStr(WHANDLE wh, char FAR *theStr)
WHANDLE wh;            /* Window handle. */
char FAR *theStr;               /* String to display. */

Remarks

Output that normally causes the window to scroll produces undefined results in windows that don't have the AUTOSCROLL attribute set.

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

Example

The following example uses _WPutStr( ) to display a string containing all 8-bit values (except '\0') in a new window.

Visual FoxPro Code

SET LIBRARY TO WPUTSTR 

C Code

#include <pro_ext.h>

FAR Example(ParamBlk FAR *parm)
{
   int i;
   WHANDLE wh;
   char String[256];

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

   for (i = 0; i < 255; i++)
      String[i] = i + 1;
   String[255] = '\0';
   _WPutStr(wh, String);
}

FoxInfo myFoxInfo[] = {
   {"ONLOAD", (FPFI) Example, CALLONLOAD, ""},
};
FoxTable _FoxTable = {
   (FoxTable FAR *) 0, sizeof(myFoxInfo)/sizeof(FoxInfo), myFoxInfo
};

See Also

_WPutChr( ) | _WGetCursorP( ) API Library Routine | Accessing the Visual FoxPro API | _WPosCursor( ) API Library Routine