英语翻译MSDN DrawText DT_CALCRECTDetermines 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 l

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/29 08:58:38
英语翻译MSDN DrawText DT_CALCRECTDetermines 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 l

英语翻译MSDN DrawText DT_CALCRECTDetermines 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 l
英语翻译
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返回格式化的高但是不会画这个文本.

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

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

全部展开

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

收起

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

全部展开

MSDN : 全称是 Microsoft Developer Network。这是微软公司面向软件开发者的一种信息服务
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使用矩形的宽指的是 lpRect 参数指向的那个矩形的宽度,而且为了限制文本的最后一行,DrawText还会延长这个矩形底(即宽度)。如果文本只有一行,DrawText则会修改这个矩形的右边,以便DrawTex在文本行中限制最后的字符。无论属于哪种情况,DrawText都会返回到格式化的高度,但不会再显示(即:绘制出)这个文本。

收起