• Advertisement
Sign in to follow this  

textboxes in gui

This topic is 3575 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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"

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
sorry for my ignorance but I didn't understand what you mean. I googled "CALLCRECT directx" but i couldn't find anything.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement