textboxes in gui

Started by
1 comment, last by erin 15 years, 11 months ago
hi, I have read the gui tutorial on this site(developing a gui using c++ and dx..) but there is something I didnt understand bout the textboxes. its written that I have to draw "caret" according to the lenght of my text, but some characters are wider than others how can I predict how much pixel I have to go "right".I mean these two strings wont be taking the same space. "iiiiii" "oooooo"
Advertisement
Only for variable width fonts. For those you'll likely need to use some measuring method (DrawText with the CALCRECT flag set for D3DXFont for example).
sorry for my ignorance but I didn't understand what you mean. I googled "CALLCRECT directx" but i couldn't find anything.

This topic is closed to new replies.

Advertisement