DrawText好像就是不能自动换行的,从名字就能猜出大半。 自己计算长度,然后分行输出把。 不过刚才查了一下你可以用DrawTextEx试试,因为有下面来自msdn的参考: It formats text by expanding tabs into appropriate spaces, aligning text to the left, right, or center of the given rectangle, and breaking text into lines that fit within the given rectangle. The type of formatting is specified by nFormat and lpDTParams. For more information, see CDC::DrawText and DrawTextEx in the Platform SDK.
这样行不行?
自己计算长度,然后分行输出把。
不过刚才查了一下你可以用DrawTextEx试试,因为有下面来自msdn的参考:
It formats text by expanding tabs into appropriate spaces, aligning text to the left, right, or center of the given rectangle, and breaking text into lines that fit within the given rectangle. The type of formatting is specified by nFormat and lpDTParams. For more information, see CDC::DrawText and DrawTextEx in the Platform SDK.