Skip to content

Latest commit

 

History

History
53 lines (35 loc) · 1.1 KB

SetConsoleTextAttribute.md

File metadata and controls

53 lines (35 loc) · 1.1 KB

Home

Function name : SetConsoleTextAttribute

Group: Console - Library: kernel32


The SetConsoleTextAttribute function sets the attributes of characters written to the console screen buffer by the WriteFile or WriteConsole function, or echoed by the ReadFile or ReadConsole function.


Code examples:

Creating a console window for Visual FoxPro application

Declaration:

BOOL SetConsoleTextAttribute(
  HANDLE hConsoleOutput,
  WORD wAttributes
);
  

FoxPro declaration:

DECLARE INTEGER SetConsoleTextAttribute IN kernel32;
	INTEGER hConsoleOutput,;
	SHORT   wAttributes  

Parameters:

hConsoleOutput [in] Handle to a console screen buffer.

wAttributes [in] Character attributes.


Return value:

If the function succeeds, the return value is nonzero.


Comments:

This function affects text written after the function call.