用C ++格式化字母 [英] Format letters in c++

查看:132
本文介绍了用C ++格式化字母的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,有没有一种方法可以在c ++中格式化字母?

如果我将文本输出到Word文档中,是否有一种简单的方法来更改颜色,字体大小等?

Hi All, Is there a way to format letters in c++?

If I output a text into a word document, is there a simple way to change the colour, font size etc ?

推荐答案

您可以使用纯文本格式,例如HTML和支持格式的Rich Text,可以被文字处理应用程序读取.

但是,在C ++中创建字符串时,必须添加格式语句.对于简单的格式化这不是很难,但是在使用复杂的格式化时可能变得复杂.如果HTML符合您的要求,请使用HTML,因为它的格式更简单,纯文本的可读性更好.
You may use plain text formats like HTML and Rich Text that support formatting and can be read by word processing applications.

However, you must add the formatting sentences when creating your strings within C++. This is not very difficult for simple formatting, but can become complicated when using sophisticated formatting. Use HTML if it matches your requirements because the format is simpler and the plain text is better readable.


这篇关于用C ++格式化字母的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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