开发者

LPD3DXFONT DrawText using DT_CALCRECT?

How do I use DT_CALCRECT to determine my rectangle bottom and right coords? e.g I have this rect: RECT textPos; textPos.left = 100; textPos.right = 100;

What do I 开发者_运维问答do next to calculate the rect and draw the text?


Mmm you just make a call to DrawText with the DT_CALCRECT parameter set, and the pointer to your original rectangle. It will modify the rectangle, extending the bottom and right values. Then you make another call to DrawText with your updated rectangle and whatever DT_ parameter needed.

http://msdn.microsoft.com/en-us/library/ms901121.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜