views:

287

answers:

1

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?

+1  A: 

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

DeusAduro