Reputation: 3462
I'm using directx to draw my string, directx uses GDI to draw the string..
I'm using DrawText
to draw my string. I need a way to find the width of the string.
Any idea ?
Upvotes: 2
Views: 1479
Reputation: 116190
You mean this DrawText? If so, it has a DT_CALCRECT
flag that allows you to calculate the size of the text to draw.
Upvotes: 5
Reputation: 6153
DrawText can calculate it for you. See the DT_CALCRECT flag:
http://msdn.microsoft.com/en-us/library/dd162498%28v=vs.85%29.aspx
Upvotes: 3