Skip to content

Latest commit

 

History

History
74 lines (50 loc) · 1.82 KB

FillConsoleOutputCharacter.md

File metadata and controls

74 lines (50 loc) · 1.82 KB

Home

Function name : FillConsoleOutputCharacter

Group: Console - Library: kernel32


The FillConsoleOutputCharacter function writes a character to the console screen buffer a specified number of times, beginning at the specified coordinates.


Code examples:

Creating a console window for Visual FoxPro application

Declaration:

BOOL FillConsoleOutputCharacter(
  HANDLE hConsoleOutput,
  TCHAR cCharacter,
  DWORD nLength,
  COORD dwWriteCoord,
  LPDWORD lpNumberOfCharsWritten
);
  

FoxPro declaration:

DECLARE INTEGER FillConsoleOutputCharacter IN kernel32;
	INTEGER hConsoleOutput,;
	SHORT   cCharacter,;
	INTEGER nLength,;
	SHORT   x,;
	SHORT   y,;
	INTEGER lpNumberOfCharsWritten
  

Parameters:

hConsoleOutput [in] Handle to a console screen buffer.

cCharacter [in] Character to write to the console screen buffer.

nLength [in] Number of character cells to which the character should be written.

dwWriteCoord [in] A COORD structure that specifies the console screen buffer coordinates of the first cell to which the character is to be written.

lpNumberOfCharsWritten [out] Pointer to a variable that receives the number of characters actually written to the console screen buffer.


Return value:

If the function succeeds, the return value is nonzero.


Comments:

The attribute values at the positions written are not changed. Use the FillConsoleOutputAttribute function to set the characters attribute.

Normally I would declare COORD dwWriteCoord as STRING @dwCursorPosition. It did not work this way. Fortunately SHORT, SHORT does the job.

See also: FillConsoleOutputAttribute, SetConsoleTextAttribute.