DrawText VS TextOut Win32 [英] DrawText VS TextOut Win32

查看:358
本文介绍了DrawText VS TextOut Win32的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现以前使用过这两个函数,但我不太清楚它们之间的区别。好吧,我知道DrawText需要一个格式化矩形,并且可以做一些文本格式化,只textout起始坐标,有什么其他差异吗?

解决方案

DrawText




  • 它将一个文本字符串绘制到逻辑坐标中指定的一个矩形区域。

  • 它提供了方便的格式化多行文本的方法


$ b b b b b p> TextOut




  • 它是一个易于使用的简单的文本绘制函数。

  • 它在指定的位置绘制一个字符串,




  • b $ b

    另外,请查看 ExTextOut DrawTextEx


    I find have used both these functions before, but I don't quite see the the difference between them. Well, I know that DrawText requires a formatting rectangle,and can do some text formatting, and textout only the starting coordinates, are there any other differences?

    解决方案

    DrawText

    • It draws a text string into a rectangle region specified in logical coordinates.
    • It provides convenient ways of formatting multiline text.
    • It is mainly used for wordbreaking paragraph formatting, expanding tabs etc.

    TextOut

    • It is a simple text-drawing function which is easy to use.
    • It draws a character string at a specified location, using the currently selected text attributes.
    • The text string to draw does not need to be zero terminated.

    Also, take a look at ExTextOut and DrawTextEx

    这篇关于DrawText VS TextOut Win32的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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