如何设置C / C ++控制台文本粗体和斜体 [英] How to set C/C++ console text bold and italic

查看:228
本文介绍了如何设置C / C ++控制台文本粗体和斜体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在开发控制台模式的Visual C ++应用程序,我想将控制台文本设置为
Bold Italic表格。

我使用  SetConsoleTextAttribute
功能和系统("COLOR XX")更改了控制台文字颜色和背景颜色功能。

但是没有Win32 API 功能将文本模式更改为BOLD,Italic或Stroke。

请提及任何功能或机制在C / C ++编程边界内实现它?

谢谢。

Hi,
I am developing an Visual C++ application in console mode,I want to set my console text in to Bold and Italic form.
I changed console text color and background color using SetConsoleTextAttribute function and system("COLOR XX") functions.
But there is no Win32 API  function to changed text mode in to BOLD,Italic or Stroke.
Please mention any function or mechanism to achieve it within C/C++ programming boundary?
Thank you.

推荐答案

您只能在控制台应用程序中使用不同的颜色(你已经提到了)。但是在控制台窗口的输出中无法使用粗体,斜体或笔触文本选项。
You can only use different colors in a console application (that you already mentioned). But it is not possible to use bold, italic or stroke text options in the outputs in the console window.


这篇关于如何设置C / C ++控制台文本粗体和斜体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆