   How to get the LPD3DXFONT's  width in DX9?
  I want to create a edit box, but how can I get the font's width(pixels)?you konw that number and char have different size...so I have to get current char(or number) width.To get it and then the cusor will follow the char...   
ID3DXFont::DrawText(..., DT_CALCRECT, ...); will tell you.   ;Quote:Original post by Evil SteveID3DXFont::DrawText(..., DT_CALCRECT, ...); will tell you.thank you very much!I get it:RECT rect = {0, 0, 0,0};ID3DXFont::DrawTextW(NULL, "123hello", 2, &rect, DT_CALCRECT, 0xffffffff);return rect.Right - rect.Left;   