font metrics with drawText()
Hi,
so I'm working on a small GUI project with directx and for some controls such as textboxes I need to know the exact size a string will have when it is displayed. Currently I'm using LPD3DXFONT::drawText() in order to draw text. When I try to get the rectangle the text will display in by passing DT_CALCRECT, the rectangle is pretty inexact. Does anyone know how to get the exact size of displayed text?
Thanks
It's been a while since I had to do this, but I don't remember having any problems with GetTextExtentPoint32() so it might be worth giving that a try?
hth
Jack
hth
Jack
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement