[CMD]: Continue refactoring to lay out the way to using the CONUTILS library in CMD...
[reactos.git] / reactos / base / shell / cmd / color.c
index b8ce749..5ac01c2 100644 (file)
@@ -46,7 +46,7 @@ INT CommandColor(LPTSTR rest)
     /* No parameter: Set the default colors */
     if (rest[0] == _T('\0'))
     {
-        ConSetScreenColor(wDefColor, TRUE);
+        ConSetScreenColor(GetStdHandle(STD_OUTPUT_HANDLE), wDefColor, TRUE);
         return 0;
     }
 
@@ -87,7 +87,8 @@ INT CommandColor(LPTSTR rest)
      * 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);