SetConsoleTextAttribute PROC   (MS-Windows)

   Sets the foreground (text) and background color attributes of characters subsequently written to a screen buffer by WriteFile or WriteConsole, or echoed by ReadFile or ReadConsole.


SetConsoleTextAttribute PROTO,
    nStdHandle:DWORD,   ; console output handle
    nColor:DWORD        ; color attribute

Returns: (BOOL) EAX = TRUE (non-zero) if successful,
                      FALSE (zero) if fails.

Argument Win Type MASM Type Description
nStdHandle HANDLE DWORD  Handle to a console screen buffer.
 The handle must have GENERIC_READ access.
nColor WORD DWORD  Specifies the foreground and background color attributes.
 Any combination of the following values can be used:
· FOREGROUND_BLUE
· FOREGROUND_GREEN
· FOREGROUND_RED
· FORGROUND_INTENSITY
· BACKGROUND_BLUE
· BACKGROUND_GREEN
· BACKGROUND_RED
· BACKGROUND_INTENSITY
 For example, white test on a black background:
FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED

Converted from CHM to HTML with chm2web Pro 2.85 (unicode)