_WPutChr( ) API Library Routine

Displays one character char at the output position in the specified window and in the current color.

void _WPutChr(WHANDLE wh, int char)
WHANDLE wh;            /* Window handle. */
int char;                     /* Character to display. */

Remarks

Special characters such as newline, carriage return, and bell are treated as control characters and aren't displayed on the screen.

To show the character that corresponds to one of these control characters, add 256 to the value of the character.

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 _WPutChr( ) to display all 8-bit values in a new window.

Visual FoxPro Code

SET LIBRARY TO WPUTCHR 

C Code

#include <pro_ext.h>

FAR Example(ParamBlk FAR *parm)
{
   int i;
   WHANDLE wh;

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

   for (i = 0; i < 256; i++)
      _WPutChr(wh, i);
}

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

See Also

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