英语翻译MSDN DrawText DT_CALCRECTDetermines the width and height

英语翻译
MSDN DrawText
DT_CALCRECT
Determines the width and height of the rectangle.If there are multiple lines of text,DrawText uses the width of the rectangle pointed to by the lpRect parameter and extends the base of the rectangle to bound the last line of text.If there is only one line of text,DrawText modifies the right side of the rectangle so that it bounds the last character in the line.In either case,DrawText returns the height of the formatted text but does not draw the text.
规定矩形的高和宽.如果文本有多行线.DrawText使用矩形的宽指定这个矩形参数和延长以这个矩形以基础限制文本的最后一行.如果文本只有一行,DrawText修改这个矩形的右边以便于在行限制最后字符.无论发生什么,这个DrawText返回格式化的高但是不会画这个文本.
andylau301 1年前 已收到3个回答 举报

44500009 幼苗

共回答了14个问题采纳率:92.9% 举报

此函数决定矩形的宽和高.如果是多行文本,DrawText函数使用lpRect参数所指定的矩形的宽度,并且延伸矩形原来的高度让它可以包含文本的最后一行.如果文本是单行的,DrawText函数改变矩形的右边界让它可以包含这行的最后一个字符.无论是两种情况的任何一种,DrawText函数都会返回格式化的文本的高度,而不是去绘制此文本.
(改变右边框的宽度和伸缩它的宽度不是一个概念哦.return是返回值)

1年前 追问

2

andylau301 举报

改变右边框的宽度和伸缩它的宽度不是一个概念哦。return是返回值 //伸缩它的宽度什么意思?

举报 44500009

那是另一位同学的答案里面的。

andylau301 举报

伸缩它的宽度与改变右边框为啥不是一个概念

举报 44500009

伸缩宽度一般是以中心点来左右对称做的,那么左边的坐标也会改。

andylau301 举报

and extends the base of the rectangle to bound the last line of text 并且延伸矩形原来的高度让它可以包含文本的最后一行//高度与延伸单词在哪?

举报 44500009

extend 是延伸。延伸一个矩形,让它包括文本最后一行,那当然是向下延伸高度了。

andylau301 举报

上一句不是说的DrawText函数使用lpRect参数所指定的矩形的宽度//使用的宽度吗?

举报 44500009

对啊,宽度不变,延伸高度啊

andylau301 举报

the base of the rectangle to bound //句子这几句怎么不翻译进去呀?

举报 44500009

翻了:原来的高度让它可以包含 the base of the rectangle 矩形原来的大小(因为宽度不变,所以直接用高度了) to bound 去包含 你hi我吧,问太多次要扣分。

xdh0124 幼苗

共回答了42个问题 举报

MSDN : 全称是 Microsoft Developer Network。这是微软公司面向软件开发者的一种信息服务
DrawText :函数在指定的矩形里写入格式化文本,根据指定的方法对文本格式化(扩展的制表符,字符对齐、折行等)。
DT: 暗行扫描。
CALCRECT:计算机辅助学习绘图用的矩形类。
Determines the width and...

1年前

1

mechen38 幼苗

共回答了3205个问题 举报

该参数主要作用是决定矩形的高度和宽度。如果是多行文本(line这里不是线的意思,是文本有多行的意思),矩形文本框的宽度是由DrawText函数中的lpRect参数所指定,但这个矩形框高度会自动变大以便能将所有文本都容纳进去。如果文本只有一行的话,DrawText函数伸缩矩形框的宽度(字面是改变右边框)以便适应将这一行文本的最后字符限定在框内。在任何一种情况下(两种的任意一种),DrawText函数...

1年前

0
可能相似的问题
Copyright © 2024 YULUCN.COM - 雨露学习互助 - 19 q. 0.026 s. - webmaster@yulucn.com