/* No parameter: Set the default colors */
if (rest[0] == _T('\0'))
{
- ConSetScreenColor(wDefColor, TRUE);
+ ConSetScreenColor(GetStdHandle(STD_OUTPUT_HANDLE), wDefColor, TRUE);
return 0;
}
* Set the chosen color. Use also the following advanced flag:
* /-F to avoid changing already buffered foreground/background.
*/
- if (ConSetScreenColor(wColor, !_tcsstr(rest, _T("/-F")) && !_tcsstr(rest, _T("/-f"))) == FALSE)
+ if (ConSetScreenColor(GetStdHandle(STD_OUTPUT_HANDLE), wColor,
+ !_tcsstr(rest, _T("/-F")) && !_tcsstr(rest, _T("/-f"))) == FALSE)
{
/* Failed because foreground and background colors were the same */
ConErrResPuts(STRING_COLOR_ERROR1);