简体   繁体   English

无法在visual studio 2010中更改输出的文本颜色和文本背景

[英]not able to change text color and text background of output in visual studio 2010

how to change text color and text background of output in visual studio 2010? 如何在visual studio 2010中更改输出的文本颜色和文本背景? textcolor() ,textbackground(), textmode() functions are not working. textcolor() ,textbackground(), textmode()函数不起作用。 is there any alternative? 还有其他选择吗?

If I understood your question correctly, and you're talking about changing colors in your c/c++ console application. 如果我正确地理解了你的问题,而你正在谈论改变c / c ++ 控制台应用程序中的颜色。
You can use the SetConsoleAttribute to change the color in the console. 您可以使用SetConsoleAttribute更改控制台中的颜色。 Here is an example 这是一个例子

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Visual Studio C ++,如何更改“nullptr”的文本颜色 - Visual Studio C++, how to change the text color for “nullptr” Visual Studio 2010文本编辑器越野车插入符 - Visual Studio 2010 text editor buggy caret 如何更改文字和背景颜色? - How to change text and background color? Visual Studio 2010:如何将内存打印到文本文件? - Visual Studio 2010: How to print memory to a text file? 如何将控制台输出的文本颜色更改为红色,但是如果从Powershell或CMD运行,则背景保持相同的颜色 - How can you change the text color of console output to red, but background remains the same color if ran from Powershell or CMD Visual Studio Express 2017 Output 不显示笔划文本 function - Visual Studio Express 2017 Output not displaying for stroke text function ALLEGRO5 根据背景更改文本的像素颜色 - ALLEGRO5 change pixel color of text based on background 从派生的 CEdit 更改文本和背景颜色 class - Change text and background color from a CEdit derived class 如何在Windows控制台应用程序中更改文本或背景色 - How to change text or background color in a Windows console application 如何更改QTreeWidgetItem的一部分的背景或文本颜色 - How can you change the background or text color for part of a QTreeWidgetItem
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM